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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | receiveEther | function receiveEther() payable {
EtherReceived(msg.sender, msg.value);
}
| //////
/// @notice Called anytime ether is sent to the contract && creates an event
/// to more easily track the incoming transactions | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
4148,
4240
]
} | 11,000 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | function () payable {
receiveEther();
}
| /// @notice The fall back function is called whenever ether is sent to this
/// contract | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
4343,
4401
]
} | 11,001 | ||
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | authorizePayment | function authorizePayment(
string _name,
bytes32 _reference,
address _recipient,
uint _amount,
uint _paymentDelay
) returns(uint) {
// Fail if you arent on the `allowedSpenders` white list
if (!allowedSpenders[msg.sender] ) throw;
uint idPayment = authorizedPayments.length; ... | ////////
/// @notice only `allowedSpenders[]` Creates a new `Payment`
/// @param _name Brief description of the payment that is authorized
/// @param _reference External reference of the payment
/// @param _recipient Destination of the payment
/// @param _amount Amount to be paid in wei
/// @param _paymentDelay Number ... | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
4985,
6098
]
} | 11,002 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | collectAuthorizedPayment | function collectAuthorizedPayment(uint _idPayment) {
// Check that the `_idPayment` has been added to the payments struct
if (_idPayment >= authorizedPayments.length) throw;
Payment p = authorizedPayments[_idPayment];
// Checking for reasons not to execute the payment
if (msg.sender != p.... | /// @notice only `allowedSpenders[]` The recipient of a payment calls this
/// function to send themselves the ether after the `earliestPayTime` has
/// expired
/// @param _idPayment The payment ID to be executed | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
6336,
7121
]
} | 11,003 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | delayPayment | function delayPayment(uint _idPayment, uint _delay) onlySecurityGuard {
if (_idPayment >= authorizedPayments.length) throw;
// Overflow test
if (_delay > 10**18) throw;
Payment p = authorizedPayments[_idPayment];
if ((p.securityGuardDelay + _delay > maxSecurityGuardDelay) ||
(p.p... | /////////
/// @notice `onlySecurityGuard` Delays a payment for a set number of seconds
/// @param _idPayment ID of the payment to be delayed
/// @param _delay The number of seconds to delay the payment | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
7383,
7874
]
} | 11,004 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | cancelPayment | function cancelPayment(uint _idPayment) onlyOwner {
if (_idPayment >= authorizedPayments.length) throw;
Payment p = authorizedPayments[_idPayment];
if (p.canceled) throw;
if (p.paid) throw;
p.canceled = true;
PaymentCanceled(_idPayment);
}
| ///////
/// @notice `onlyOwner` Cancel a payment all together
/// @param _idPayment ID of the payment to be canceled. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
8038,
8349
]
} | 11,005 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | authorizeSpender | function authorizeSpender(address _spender, bool _authorize) onlyOwner {
allowedSpenders[_spender] = _authorize;
SpenderAuthorization(_spender, _authorize);
}
| /// @notice `onlyOwner` Adds a spender to the `allowedSpenders[]` white list
/// @param _spender The address of the contract being authorized/unauthorized
/// @param _authorize `true` if authorizing and `false` if unauthorizing | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
8595,
8781
]
} | 11,006 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | setSecurityGuard | function setSecurityGuard(address _newSecurityGuard) onlyOwner {
securityGuard = _newSecurityGuard;
}
| /// @notice `onlyOwner` Sets the address of `securityGuard`
/// @param _newSecurityGuard Address of the new security guard | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
8917,
9037
]
} | 11,007 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | setTimelock | function setTimelock(uint _newTimeLock) onlyOwner {
if (_newTimeLock < absoluteMinTimeLock) throw;
timeLock = _newTimeLock;
}
| /// @notice `onlyOwner` Changes `timeLock`; the new `timeLock` cannot be
/// lower than `absoluteMinTimeLock`
/// @param _newTimeLock Sets the new minimum default `timeLock` in seconds;
/// pending payments maintain their `earliestPayTime` | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
9302,
9455
]
} | 11,008 | |
Vault | Vault.sol | 0x598ab825d607ace3b00d8714c0a141c7ae2e6822 | Solidity | Vault | contract Vault is Escapable {
/// @dev `Payment` is a public structure that describes the details of
/// each payment making it easy to track the movement of funds
/// transparently
struct Payment {
string name; // What is the purpose of this payment
bytes32 reference; // ... | /// @dev `Vault` is a higher level contract built off of the `Escapable`
/// contract that holds funds for Campaigns and automates payments. | NatSpecSingleLine | setMaxSecurityGuardDelay | function setMaxSecurityGuardDelay(uint _maxSecurityGuardDelay) onlyOwner {
maxSecurityGuardDelay = _maxSecurityGuardDelay;
}
| /// @notice `onlyOwner` Changes the maximum number of seconds
/// `securityGuard` can delay a payment
/// @param _maxSecurityGuardDelay The new maximum delay in seconds that
/// `securityGuard` can delay the payment's execution in total | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://68cd6154297c049e19a780d0ef661705ad3182cbc26e6886b7998f84aa4cfa7b | {
"func_code_index": [
9716,
9859
]
} | 11,009 | |
InariV1 | @boringcrypto/boring-solidity/contracts/libraries/BoringERC20.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | BoringERC20 | library BoringERC20 {
bytes4 private constant SIG_BALANCE_OF = 0x70a08231; // balanceOf(address)
bytes4 private constant SIG_APPROVE = 0x095ea7b3; // approve(address,uint256)
bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256)
bytes4 private constant SIG_TRANSFER_FROM = 0... | /// License-Identifier: MIT
/// @dev Adapted for Inari. | NatSpecSingleLine | safeBalanceOfSelf | function safeBalanceOfSelf(IERC20 token) internal view returns (uint256 amount) {
(bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_BALANCE_OF, address(this)));
require(success && data.length >= 32, "BoringERC20: BalanceOf failed");
amount = abi.decode(data, (uint25... | /// @notice Provides a gas-optimized balance check on this contract to avoid a redundant extcodesize check in addition to the returndatasize check.
/// @param token The address of the ERC-20 token.
/// @return amount The token amount. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
625,
973
]
} | 11,010 |
InariV1 | @boringcrypto/boring-solidity/contracts/libraries/BoringERC20.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | BoringERC20 | library BoringERC20 {
bytes4 private constant SIG_BALANCE_OF = 0x70a08231; // balanceOf(address)
bytes4 private constant SIG_APPROVE = 0x095ea7b3; // approve(address,uint256)
bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256)
bytes4 private constant SIG_TRANSFER_FROM = 0... | /// License-Identifier: MIT
/// @dev Adapted for Inari. | NatSpecSingleLine | safeApprove | function safeApprove(
IERC20 token,
address to,
uint256 amount
) internal {
(bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_APPROVE, to, amount));
require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: Approve failed");
}
| /// @notice Provides a safe ERC20.approve version for different ERC-20 implementations.
/// @param token The address of the ERC-20 token.
/// @param to The address of the user to grant spending right.
/// @param amount The token amount to grant spending right over. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
1266,
1610
]
} | 11,011 |
InariV1 | @boringcrypto/boring-solidity/contracts/libraries/BoringERC20.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | BoringERC20 | library BoringERC20 {
bytes4 private constant SIG_BALANCE_OF = 0x70a08231; // balanceOf(address)
bytes4 private constant SIG_APPROVE = 0x095ea7b3; // approve(address,uint256)
bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256)
bytes4 private constant SIG_TRANSFER_FROM = 0... | /// License-Identifier: MIT
/// @dev Adapted for Inari. | NatSpecSingleLine | safeTransfer | function safeTransfer(
IERC20 token,
address to,
uint256 amount
) internal {
(bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER, to, amount));
require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: Transfer failed");
}
| /// @notice Provides a safe ERC20.transfer version for different ERC-20 implementations.
/// Reverts on a failed transfer.
/// @param token The address of the ERC-20 token.
/// @param to Transfer tokens to.
/// @param amount The token amount. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
1881,
2226
]
} | 11,012 |
InariV1 | @boringcrypto/boring-solidity/contracts/libraries/BoringERC20.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | BoringERC20 | library BoringERC20 {
bytes4 private constant SIG_BALANCE_OF = 0x70a08231; // balanceOf(address)
bytes4 private constant SIG_APPROVE = 0x095ea7b3; // approve(address,uint256)
bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256)
bytes4 private constant SIG_TRANSFER_FROM = 0... | /// License-Identifier: MIT
/// @dev Adapted for Inari. | NatSpecSingleLine | safeTransferFrom | function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 amount
) internal {
(bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER_FROM, from, to, amount));
require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringER... | /// @notice Provides a safe ERC20.transferFrom version for different ERC-20 implementations.
/// Reverts on a failed transfer.
/// @param token The address of the ERC-20 token.
/// @param from Transfer tokens from.
/// @param to Transfer tokens to.
/// @param amount The token amount. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
2544,
2931
]
} | 11,013 |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
89,
272
]
} | 11,014 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
356,
629
]
} | 11,015 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
744,
860
]
} | 11,016 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
924,
1060
]
} | 11,017 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
199,
287
]
} | 11,018 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @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]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
445,
836
]
} | 11,019 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @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.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
1042,
1154
]
} | 11,020 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | BurnableToken | contract BurnableToken is BasicToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value <= balances[msg.sender]);
// no need to re... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
balances[burner] = balances[bur... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
212,
640
]
} | 11,021 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken, BurnableToken {
mapping (address => mapping (address => uint256)) internal 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | 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]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
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 transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
416,
868
]
} | 11,022 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken, BurnableToken {
mapping (address => mapping (address => uint256)) internal 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | 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.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
1500,
1690
]
} | 11,023 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken, BurnableToken {
mapping (address => mapping (address => uint256)) internal 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
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.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
2014,
2145
]
} | 11,024 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken, BurnableToken {
mapping (address => mapping (address => uint256)) internal 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* 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
* @param _spend... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
2611,
2875
]
} | 11,025 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken, BurnableToken {
mapping (address => mapping (address => uint256)) internal 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
Approval(msg... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
3346,
3756
]
} | 11,026 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | Ownable | contract Ownable {
address public owner;
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() public {
owner = msg.sender;
}... | /**
* @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() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
261,
321
]
} | 11,027 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | Ownable | contract Ownable {
address public owner;
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() public {
owner = msg.sender;
}... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
640,
816
]
} | 11,028 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | /**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/ | NatSpecMultiLine | mint | function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(address(0), _to, _amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
483,
756
]
} | 11,029 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | /**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/ | NatSpecMultiLine | finishMinting | function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
873,
1015
]
} | 11,030 | |
BitcoinBlack | BitcoinBlack.sol | 0xf7ae0daa230bf3fb3c0e5e01e7a6e0a142c6cf7e | Solidity | BitcoinBlack | contract BitcoinBlack is StandardToken, MintableToken {
string public constant name = "Bitcoin Black"; // solium-disable-line uppercase
string public constant symbol = "BLACK"; // solium-disable-line uppercase
uint8 public constant decimals = 18; // solium-disable-line uppercase
uint256 public constant ... | BitcoinBlack | function BitcoinBlack() public {
totalSupply_ = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
Transfer(0x0, msg.sender, INITIAL_SUPPLY);
}
| /**
* @dev Constructor that gives msg.sender all of existing tokens.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://726505a769ccddcd34067732052463cd120aadcfef4fde678654480d668c90ac | {
"func_code_index": [
461,
629
]
} | 11,031 | |||
DraculaHoard | ..\aar-contracts\DraculaHoard.sol | 0xc14b5ea0b86958e57e69b33322ef59d3f510884a | Solidity | DraculaHoard | contract DraculaHoard is ERC20("DraculaHoard", "BLOOD"), Ownable {
using SafeMath for uint256;
IERC20 public dracula;
uint256 public burnRate = 1;
constructor(IERC20 _dracula) public {
dracula = _dracula;
}
function setBurnRate(uint256 _burnRate) external onlyOwner {
... | balance | function balance(address account) public view returns (uint256) {
uint256 totalShares = totalSupply();
return (totalShares > 0) ? balanceOf(account).mul(dracula.balanceOf(address(this))).div(totalShares) : 0;
}
| /// @notice Return staked amount + rewards | NatSpecSingleLine | v0.6.12+commit.27d51765 | MIT | ipfs://fa6a8c66cab676743eeb33220704d1f9c268dedd17e2e58e1601a30304c86608 | {
"func_code_index": [
462,
700
]
} | 11,032 | ||
ERC20Vested | contracts/math/SignedSafeMath.sol | 0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1 | Solidity | SignedSafeMath | library SignedSafeMath {
/**
* @dev Returns the multiplication of two signed integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(int256 a, int256 b) internal... | /**
* @title SignedSafeMath
* @dev Signed math operations that revert on error.
*/ | NatSpecMultiLine | mul | function mul(int256 a, int256 b) internal pure returns (int256) {
return a * b;
}
| /**
* @dev Returns the multiplication of two signed integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f | {
"func_code_index": [
275,
375
]
} | 11,033 |
ERC20Vested | contracts/math/SignedSafeMath.sol | 0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1 | Solidity | SignedSafeMath | library SignedSafeMath {
/**
* @dev Returns the multiplication of two signed integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(int256 a, int256 b) internal... | /**
* @title SignedSafeMath
* @dev Signed math operations that revert on error.
*/ | NatSpecMultiLine | div | function div(int256 a, int256 b) internal pure returns (int256) {
return a / b;
}
| /**
* @dev Returns the integer division of two signed integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f | {
"func_code_index": [
667,
767
]
} | 11,034 |
ERC20Vested | contracts/math/SignedSafeMath.sol | 0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1 | Solidity | SignedSafeMath | library SignedSafeMath {
/**
* @dev Returns the multiplication of two signed integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(int256 a, int256 b) internal... | /**
* @title SignedSafeMath
* @dev Signed math operations that revert on error.
*/ | NatSpecMultiLine | sub | function sub(int256 a, int256 b) internal pure returns (int256) {
return a - b;
}
| /**
* @dev Returns the subtraction of two signed integers, reverting on
* overflow.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f | {
"func_code_index": [
1013,
1113
]
} | 11,035 |
ERC20Vested | contracts/math/SignedSafeMath.sol | 0xcdb9d30a3ba48cdfcb0ecbe19317e6cf783672f1 | Solidity | SignedSafeMath | library SignedSafeMath {
/**
* @dev Returns the multiplication of two signed integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(int256 a, int256 b) internal... | /**
* @title SignedSafeMath
* @dev Signed math operations that revert on error.
*/ | NatSpecMultiLine | add | function add(int256 a, int256 b) internal pure returns (int256) {
return a + b;
}
| /**
* @dev Returns the addition of two signed integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://ff477603eee65922adc0e88083abef1fcda42c119dc941d4d45d38e1cb8f776f | {
"func_code_index": [
1353,
1453
]
} | 11,036 |
UniqGenesis | ./contracts/utils/ERC721/ERC721Claimable.sol | 0xd804c52524f1cfad0fae54d2f2b15871337e96b3 | Solidity | ERC721Claimable | abstract contract ERC721Claimable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
// ----- VARIABLES ----- //
address proxyRegistryAddress;
string internal _token_uri;
address internal _claimingAddress;
string public METADATA_PROVENANCE_HASH;
uint256 public RO... | baseTokenURI | function baseTokenURI() public view virtual returns (string memory){
return _token_uri;
}
| // ----- VIEWS ----- // | LineComment | v0.8.6+commit.11564f7e | MIT | ipfs://5adf4d24848f3e599a1110d0be7c407fa8f355a20311f48c1565b436f59758af | {
"func_code_index": [
1076,
1181
]
} | 11,037 | ||
UniqGenesis | ./contracts/utils/ERC721/ERC721Claimable.sol | 0xd804c52524f1cfad0fae54d2f2b15871337e96b3 | Solidity | ERC721Claimable | abstract contract ERC721Claimable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
// ----- VARIABLES ----- //
address proxyRegistryAddress;
string internal _token_uri;
address internal _claimingAddress;
string public METADATA_PROVENANCE_HASH;
uint256 public RO... | burn | function burn(uint256 _tokenId) external {
if (msg.sender != _claimingAddress) {
require(
_isApprovedOrOwner(msg.sender, _tokenId),
"Ownership or approval required"
);
}
_burn(_tokenId);
}
| // ----- PUBLIC METHODS ----- // | LineComment | v0.8.6+commit.11564f7e | MIT | ipfs://5adf4d24848f3e599a1110d0be7c407fa8f355a20311f48c1565b436f59758af | {
"func_code_index": [
2812,
3088
]
} | 11,038 | ||
UniqGenesis | ./contracts/utils/ERC721/ERC721Claimable.sol | 0xd804c52524f1cfad0fae54d2f2b15871337e96b3 | Solidity | ERC721Claimable | abstract contract ERC721Claimable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
// ----- VARIABLES ----- //
address proxyRegistryAddress;
string internal _token_uri;
address internal _claimingAddress;
string public METADATA_PROVENANCE_HASH;
uint256 public RO... | editClaimingAdress | function editClaimingAdress(address _newAddress) external onlyOwner {
_claimingAddress = _newAddress;
}
| // ----- OWNERS METHODS ----- // | LineComment | v0.8.6+commit.11564f7e | MIT | ipfs://5adf4d24848f3e599a1110d0be7c407fa8f355a20311f48c1565b436f59758af | {
"func_code_index": [
3382,
3501
]
} | 11,039 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
95,
308
]
} | 11,040 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
398,
691
]
} | 11,041 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
811,
939
]
} | 11,042 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
1009,
1161
]
} | 11,043 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
211,
307
]
} | 11,044 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
... | /**
* @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]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_va... | /**
* @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 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
475,
903
]
} | 11,045 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
... | /**
* @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 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
1119,
1239
]
} | 11,046 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal 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 t... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | 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]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
... | /**
* @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.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
413,
906
]
} | 11,047 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal 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 t... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit 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.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
1558,
1769
]
} | 11,048 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal 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 t... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | 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.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
2105,
2258
]
} | 11,049 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal 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 t... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit 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.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
2515,
2809
]
} | 11,050 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | TokenVesting | contract TokenVesting is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint25... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | release | function release(ERC20Basic token) public {
uint256 unreleased = releasableAmount(token);
require(unreleased > 0);
released[token] = released[token].add(unreleased);
token.safeTransfer(beneficiary, unreleased);
emit Released(unreleased);
}
| /**
* @notice Transfers vested tokens to beneficiary.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
1791,
2093
]
} | 11,051 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | TokenVesting | contract TokenVesting is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint25... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | revoke | function revoke(ERC20Basic token) public onlyOwner {
require(revocable);
require(!revoked[token]);
uint256 balance = token.balanceOf(this);
uint256 unreleased = releasableAmount(token);
uint256 refund = balance.sub(unreleased);
revoked[token] = true;
token.safeTransfer(ownerSh... | /**
* @notice Allows the owner to revoke the vesting. Tokens already vested
* remain in the contract, the rest are returned to the owner.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
2315,
2714
]
} | 11,052 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | TokenVesting | contract TokenVesting is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint25... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | releasableAmount | function releasableAmount(ERC20Basic token) public view returns (uint256) {
return vestedAmount(token).sub(released[token]);
}
| /**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
2879,
3024
]
} | 11,053 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | TokenVesting | contract TokenVesting is Owned {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint25... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | vestedAmount | function vestedAmount(ERC20Basic token) public view returns (uint256) {
uint256 currentBalance = token.balanceOf(this);
uint256 totalBalance = currentBalance.add(released[token]);
if (block.timestamp < cliff) {
return 0;
} else if (block.timestamp >= start.add(duration) || revoked[token])... | /**
* @dev Calculates the amount that has already vested.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
3160,
3657
]
} | 11,054 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | TokenVault | contract TokenVault {
using SafeERC20 for ERC20;
// ERC20 token contract being held
ERC20 public token;
constructor(ERC20 _token) public {
token = _token;
}
/**
* @notice Allow the token itself to send tokens
* using transferFrom().
*/
function fillUpA... | /**
* @title TokenVault
* @dev TokenVault is a token holder contract that will allow a
* beneficiary to spend the tokens from some function of a specified ERC20 token
*/ | NatSpecMultiLine | fillUpAllowance | function fillUpAllowance() public {
uint256 amount = token.balanceOf(this);
require(amount > 0);
token.approve(token, amount);
}
| /**
* @notice Allow the token itself to send tokens
* using transferFrom().
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
300,
467
]
} | 11,055 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | BurnableToken | contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value > 0);
require(_valu... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
require(_value > 0);
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
225,
720
]
} | 11,056 |
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | createReserveTokensVault | function createReserveTokensVault() external onlyOwner {
require(reserveTokensVault == address(0));
/// Reserve tokens - 50 million
uint256 reserveTokens = 50000000;
reserveTokensVault = createTokenVaultInt(reserveTokens);
require(totalSupply_ <= HARD_CAP);
}
| /// @dev Create a ReserveTokenVault | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
1332,
1651
]
} | 11,057 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | createTokenVaultInt | function createTokenVaultInt(uint256 tokens) internal onlyOwner returns (TokenVault) {
TokenVault tokenVault = new TokenVault(ERC20(this));
createTokensInt(tokens, tokenVault);
tokenVault.fillUpAllowance();
return tokenVault;
}
| /// @dev Create a TokenVault and fill with the specified newly minted tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
1736,
2009
]
} | 11,058 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | createTokensInt | function createTokensInt(uint256 _tokens, address _destination) internal onlyOwner {
uint256 tokens = _tokens * 10**uint256(decimals);
totalSupply_ = totalSupply_.add(tokens);
balances[_destination] = balances[_destination].add(tokens);
emit Transfer(0x0, _destination, tokens);
require(totalS... | // @dev create specified number of tokens and transfer to destination | LineComment | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
2087,
2459
]
} | 11,059 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | vestTokensDetailInt | function vestTokensDetailInt(
address _beneficiary,
uint256 _startS,
uint256 _cliffS,
uint256 _durationS,
bool _revocable,
uint256 _tokensAmountInt) external onlyOwner {
require(_beneficiar... | /// @dev vest Detail : second unit | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
2502,
3286
]
} | 11,060 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | vestTokensStartAtInt | function vestTokensStartAtInt(
address _beneficiary,
uint256 _tokensAmountInt,
uint256 _startS,
uint256 _afterDay,
uint256 _cliffDay,
uint256 _durationDay ) public onlyO... | /// @dev vest StartAt : day unit | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
3327,
4308
]
} | 11,061 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | vestTokensFromNowInt | function vestTokensFromNowInt(address _beneficiary, uint256 _tokensAmountInt, uint256 _afterDay, uint256 _cliffDay, uint256 _durationDay ) public onlyOwner {
vestTokensStartAtInt(_beneficiary, _tokensAmountInt, now, _afterDay, _cliffDay, _durationDay);
}
| /// @dev vest function from now | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
4348,
4621
]
} | 11,062 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | vestCmdNow1PercentInt | function vestCmdNow1PercentInt(address _beneficiary, uint256 _tokensAmountInt) external onlyOwner {
vestTokensFromNowInt(_beneficiary, _tokensAmountInt, 0, 0, unlock100Days);
}
| /// @dev vest the sale contributor tokens for 100 days, 1% gradual release | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
4705,
4900
]
} | 11,063 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | vestCmd3Month1PercentInt | function vestCmd3Month1PercentInt(address _beneficiary, uint256 _tokensAmountInt) external onlyOwner {
vestTokensFromNowInt(_beneficiary, _tokensAmountInt, lock90Days, 0, unlock100Days);
}
| /// @dev vest the sale contributor tokens for 100 days, 1% gradual release after 3 month later, no cliff | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
5011,
5218
]
} | 11,064 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | vestCmd1YearInstantInt | function vestCmd1YearInstantInt(address _beneficiary, uint256 _tokensAmountInt) external onlyOwner {
vestTokensFromNowInt(_beneficiary, _tokensAmountInt, 0, lock365Days, lock365Days);
}
| /// @dev vest the sale contributor tokens 100% release after 1 year | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
5294,
5498
]
} | 11,065 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | releaseVestedTokens | function releaseVestedTokens() external {
releaseVestedTokensFor(msg.sender);
}
| /// @dev releases vested tokens for the caller's own address | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
5567,
5665
]
} | 11,066 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | releaseVestedTokensFor | function releaseVestedTokensFor(address _owner) public {
TokenVesting(vestingOf[_owner]).release(this);
}
| /// @dev releases vested tokens for the specified address.
/// Can be called by anyone for any address. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
5782,
5906
]
} | 11,067 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | lockedBalanceOf | function lockedBalanceOf(address _owner) public view returns (uint256) {
return balances[vestingOf[_owner]];
}
| /// @dev check the vested balance for an address | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
5963,
6092
]
} | 11,068 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | releaseableBalanceOf | function releaseableBalanceOf(address _owner) public view returns (uint256) {
if (vestingOf[_owner] == address(0) ) {
return 0;
} else {
return TokenVesting(vestingOf[_owner]).releasableAmount(this);
}
}
| /// @dev check the locked but releaseable balance of an owner | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
6162,
6428
]
} | 11,069 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | revokeVestedTokensFor | function revokeVestedTokensFor(address _owner) public onlyOwner {
TokenVesting(vestingOf[_owner]).revoke(this);
}
| /// @dev revoke vested tokens for the specified address.
/// Tokens already vested remain in the contract, the rest are returned to the owner. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
6584,
6716
]
} | 11,070 | ||
GDS_Token | GDS_Token.sol | 0xda8b3b7f6b2fee06b99c2c1916ad074365538ca5 | Solidity | GDS_Token | contract GDS_Token is BurnableToken, Owned {
string public constant name = "GOODS";
string public constant symbol = "GDS";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated ( 100 million GDS)
uint256 public constant HARD_CAP = 100000000 * 10**uint256(decimals);
/... | makeReserveToVault | function makeReserveToVault() external onlyOwner {
require(reserveTokensVault != address(0));
reserveTokensVault.fillUpAllowance();
}
| /// @dev Create a ReserveTokenVault | NatSpecSingleLine | v0.4.24+commit.e67f0147 | Apache-2.0 | bzzr://17cad049f83c81552496518a9d7727c7b9fcb68099b07ac1bcfd775286c28843 | {
"func_code_index": [
6761,
6922
]
} | 11,071 | ||
MenapayToken | MenapayToken.sol | 0x211d171f769ec791629b88d33ae791226e6e9d5b | Solidity | MenapayToken | contract MenapayToken is Pausable, StandardToken {
string public name;
string public symbol;
uint public decimals;
address public upgradedAddress;
bool public deprecated;
function MenapayToken(uint _initialSupply, string _name, string _symbol, uint _decimals){
_totalSupply = _initialSupply;... | totalSupply | function totalSupply() constant returns (uint){
if (deprecated) {
return StandardToken(upgradedAddress).totalSupply();
} else {
return _totalSupply;
}
}
| // deprecate current contract if favour of a new one | LineComment | v0.4.11+commit.68ef5810 | MIT | bzzr://28bda969d4e85808dd3491d3c0f204a0effe44713faf391cda61b1d7f065d9fb | {
"func_code_index": [
1998,
2185
]
} | 11,072 | ||
YearnFinancePro | YearnFinancePro.sol | 0x1f9c2c8145c95ede1aa30a0b958c57deaba2e002 | Solidity | SafeMath | library SafeMath {
/*
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/*
* @d... | /*
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | Comment | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /*
* @dev Multiplies two numbers, throws on overflow.
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://8b306da7e35993512da69bed9799be3e5bdd193e391189c0f64acd4aa20bebe6 | {
"func_code_index": [
94,
301
]
} | 11,073 |
YearnFinancePro | YearnFinancePro.sol | 0x1f9c2c8145c95ede1aa30a0b958c57deaba2e002 | Solidity | SafeMath | library SafeMath {
/*
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/*
* @d... | /*
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | Comment | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /*
* @dev Integer division of two numbers, truncating the quotient.
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://8b306da7e35993512da69bed9799be3e5bdd193e391189c0f64acd4aa20bebe6 | {
"func_code_index": [
390,
690
]
} | 11,074 |
YearnFinancePro | YearnFinancePro.sol | 0x1f9c2c8145c95ede1aa30a0b958c57deaba2e002 | Solidity | SafeMath | library SafeMath {
/*
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/*
* @d... | /*
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | Comment | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /*
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://8b306da7e35993512da69bed9799be3e5bdd193e391189c0f64acd4aa20bebe6 | {
"func_code_index": [
809,
937
]
} | 11,075 |
YearnFinancePro | YearnFinancePro.sol | 0x1f9c2c8145c95ede1aa30a0b958c57deaba2e002 | Solidity | SafeMath | library SafeMath {
/*
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/*
* @d... | /*
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | Comment | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /*
* @dev Adds two numbers, throws on overflow.
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://8b306da7e35993512da69bed9799be3e5bdd193e391189c0f64acd4aa20bebe6 | {
"func_code_index": [
1006,
1152
]
} | 11,076 |
Doggo | @openzeppelin/contracts/access/Ownable.sol | 0x46ccb782da782b9e921dd447736ab64fc4fb2636 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99 | {
"func_code_index": [
408,
500
]
} | 11,077 |
Doggo | @openzeppelin/contracts/access/Ownable.sol | 0x46ccb782da782b9e921dd447736ab64fc4fb2636 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99 | {
"func_code_index": [
1059,
1167
]
} | 11,078 |
Doggo | @openzeppelin/contracts/access/Ownable.sol | 0x46ccb782da782b9e921dd447736ab64fc4fb2636 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99 | {
"func_code_index": [
1317,
1523
]
} | 11,079 |
Doggo | @openzeppelin/contracts/access/Ownable.sol | 0x46ccb782da782b9e921dd447736ab64fc4fb2636 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://b7bbd7ee9ab1542a8a2cb4bb6c14579b679e08db33719593c8b0618bf852ee99 | {
"func_code_index": [
1678,
1874
]
} | 11,080 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
606,
1230
]
} | 11,081 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
2160,
2562
]
} | 11,082 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal virtual view returns (address);
/**
*... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | /**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
114,
170
]
} | 11,083 | ||
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal virtual view returns (address);
/**
*... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _implementation | function _implementation() internal virtual view returns (address);
| /**
* @return The Address of the implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
236,
306
]
} | 11,084 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal virtual view returns (address);
/**
*... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _delegate | function _delegate(address implementation) internal {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
... | /**
* @dev Delegates execution to an implementation contract.
* This is a low level function that doesn't return to its internal call site.
* It will return to the external caller whatever the implementation returns.
* @param implementation Address to delegate.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
597,
1362
]
} | 11,085 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal virtual view returns (address);
/**
*... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _willFallback | function _willFallback() internal virtual {
}
| /**
* @dev Function that is run as the first thing in the fallback function.
* Can be redefined in derived contracts to add functionality.
* Redefinitions must call super._willFallback().
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
1575,
1626
]
} | 11,086 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal virtual view returns (address);
/**
*... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _fallback | function _fallback() internal {
_willFallback();
_delegate(_implementation());
}
| /**
* @dev fallback implementation.
* Extracted to enable manual triggering.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
1724,
1820
]
} | 11,087 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseUpgradeabilityProxy | contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
* This ... | /**
* @title BaseUpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _implementation | function _implementation() internal override view returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
| /**
* @dev Returns the current implementation.
* @return impl Address of the current implementation
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
684,
857
]
} | 11,088 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseUpgradeabilityProxy | contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
* This ... | /**
* @title BaseUpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _upgradeTo | function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
| /**
* @dev Upgrades the proxy to a new implementation.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
995,
1143
]
} | 11,089 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseUpgradeabilityProxy | contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
* This ... | /**
* @title BaseUpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _setImplementation | function _setImplementation(address newImplementation) internal {
require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
| /**
* @dev Sets the implementation address of the proxy.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
1283,
1579
]
} | 11,090 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | admin | function admin() external ifAdmin returns (address) {
return _admin();
}
| /**
* @return The address of the proxy admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
989,
1072
]
} | 11,091 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | implementation | function implementation() external ifAdmin returns (address) {
return _implementation();
}
| /**
* @return The address of the implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
1138,
1239
]
} | 11,092 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | changeAdmin | function changeAdmin(address newAdmin) external ifAdmin {
require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
emit AdminChanged(_admin(), newAdmin);
_setAdmin(newAdmin);
}
| /**
* @dev Changes the admin of the proxy.
* Only the current admin can call this function.
* @param newAdmin Address to transfer proxy administration to.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
1419,
1650
]
} | 11,093 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | upgradeTo | function upgradeTo(address newImplementation) external ifAdmin {
_upgradeTo(newImplementation);
}
| /**
* @dev Upgrade the backing implementation of the proxy.
* Only the admin can call this function.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
1838,
1946
]
} | 11,094 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | upgradeToAndCall | function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin {
_upgradeTo(newImplementation);
(bool success,) = newImplementation.delegatecall(data);
require(success);
}
| /**
* @dev Upgrade the backing implementation of the proxy and call a function
* on the new implementation.
* This is useful to initialize the proxied contract.
* @param newImplementation Address of the new implementation.
* @param data Data to send as msg.data in the low level call.
* It should include the... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
2471,
2699
]
} | 11,095 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | _admin | function _admin() internal view returns (address adm) {
bytes32 slot = ADMIN_SLOT;
assembly {
adm := sload(slot)
}
}
| /**
* @return adm The admin slot.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
2750,
2894
]
} | 11,096 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | _setAdmin | function _setAdmin(address newAdmin) internal {
bytes32 slot = ADMIN_SLOT;
assembly {
sstore(slot, newAdmin)
}
}
| /**
* @dev Sets the address of the proxy admin.
* @param newAdmin Address of the new proxy admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
3013,
3155
]
} | 11,097 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | _willFallback | function _willFallback() internal override virtual {
require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
super._willFallback();
}
| /**
* @dev Only fall back when the sender is not the admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
3232,
3412
]
} | 11,098 |
InitializableAdminUpgradeabilityProxy | InitializableAdminUpgradeabilityProxy.sol | 0xcd55262c3ea354a58661597f71037d5fa26b72bd | Solidity | InitializableUpgradeabilityProxy | contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Contract initializer.
* @param _logic Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the ... | /**
* @title InitializableUpgradeabilityProxy
* @dev Extends BaseUpgradeabilityProxy with an initializer for initializing
* implementation and init data.
*/ | NatSpecMultiLine | initialize | function initialize(address _logic, bytes memory _data) public payable {
require(_implementation() == address(0));
assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
_setImplementation(_logic);
if (_data.length > 0) {
(bool success, ) = _logic.de... | /**
* @dev Contract initializer.
* @param _logic Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be called, as described in
* https://solidity.readth... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unknown | ipfs://5b70184b910b61c840297871c0fa5a4d6a4c004bea856b7718f824c27cb83b4f | {
"func_code_index": [
604,
1016
]
} | 11,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.