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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PAaveIntegration | contracts/masset/peripheral/AaveV2Integration.sol | 0x4094aec22f40f11c29941d144c3dc887b33f5504 | Solidity | AaveV2Integration | contract AaveV2Integration is AbstractIntegration {
using SafeERC20 for IERC20;
// Core address for the given platform */
address public immutable platformAddress;
address public immutable rewardToken;
event RewardTokenApproved(address rewardToken, address account);
/**
* @param _nexus ... | /**
* @title AaveV2Integration
* @author mStable
* @notice A simple connection to deposit and withdraw bAssets from Aave
* @dev VERSION: 1.0
* DATE: 2020-16-11
*/ | NatSpecMultiLine | _checkBalance | function _checkBalance(IAaveATokenV2 _aToken) internal view returns (uint256 balance) {
return _aToken.balanceOf(address(this));
}
| /**
* @dev Get the total bAsset value held in the platform
* @param _aToken aToken for which to check balance
* @return balance Total value of the bAsset in the platform
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
8229,
8375
]
} | 2,700 | ||
Token | Token.sol | 0xa62621a592bf8ec23718e5593c2d668327381648 | Solidity | ERC20Base | contract ERC20Base is ERC20Interface {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint public totalSupply_;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://3ba331a200d1c272e4d4a16ee63afef52d0e08e05f0b087031343bfc0112e90f | {
"func_code_index": [
730,
826
]
} | 2,701 | |||
Token | Token.sol | 0xa62621a592bf8ec23718e5593c2d668327381648 | Solidity | ERC20Base | contract ERC20Base is ERC20Interface {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint public totalSupply_;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | 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.25+commit.59dbf8f1 | bzzr://3ba331a200d1c272e4d4a16ee63afef52d0e08e05f0b087031343bfc0112e90f | {
"func_code_index": [
1042,
1162
]
} | 2,702 | |||
Token | Token.sol | 0xa62621a592bf8ec23718e5593c2d668327381648 | Solidity | ERC20Base | contract ERC20Base is ERC20Interface {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint public totalSupply_;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | transfer | function transfer(address _to, uint _value) public returns (bool success) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
ret... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://3ba331a200d1c272e4d4a16ee63afef52d0e08e05f0b087031343bfc0112e90f | {
"func_code_index": [
1330,
1695
]
} | 2,703 | |||
Token | Token.sol | 0xa62621a592bf8ec23718e5593c2d668327381648 | Solidity | ERC20Base | contract ERC20Base is ERC20Interface {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint public totalSupply_;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | 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.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://3ba331a200d1c272e4d4a16ee63afef52d0e08e05f0b087031343bfc0112e90f | {
"func_code_index": [
1937,
2148
]
} | 2,704 | |||
Token | Token.sol | 0xa62621a592bf8ec23718e5593c2d668327381648 | Solidity | ERC20Base | contract ERC20Base is ERC20Interface {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint public totalSupply_;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | 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.25+commit.59dbf8f1 | bzzr://3ba331a200d1c272e4d4a16ee63afef52d0e08e05f0b087031343bfc0112e90f | {
"func_code_index": [
2435,
2928
]
} | 2,705 | |||
Token | Token.sol | 0xa62621a592bf8ec23718e5593c2d668327381648 | Solidity | ERC20Base | contract ERC20Base is ERC20Interface {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint public totalSupply_;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | 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.25+commit.59dbf8f1 | bzzr://3ba331a200d1c272e4d4a16ee63afef52d0e08e05f0b087031343bfc0112e90f | {
"func_code_index": [
3259,
3398
]
} | 2,706 | |||
Token | Token.sol | 0xa62621a592bf8ec23718e5593c2d668327381648 | Solidity | ERC20Base | contract ERC20Base is ERC20Interface {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint public totalSupply_;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | burn | function burn(uint256 _value) public {
address account = msg.sender;
totalSupply_ = totalSupply_.sub(_value);
balances[account] = balances[account].sub(_value);
emit Transfer(account, address(0), _value);
}
| /**
* @dev Destoys `amount` tokens, reducing the total supply.
* @param _value must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://3ba331a200d1c272e4d4a16ee63afef52d0e08e05f0b087031343bfc0112e90f | {
"func_code_index": [
3542,
3804
]
} | 2,707 | |||
TeamVesting | contracts/TeamVesting.sol | 0x13d0526c393de67399f262b9ae19c77d067ec344 | Solidity | TeamVesting | contract TeamVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller);
event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation);
event InvestorRemoved(address... | releaseTokens | function releaseTokens() external onlyOwner initialized() {
for (uint8 i = 0; i < investors.length; i++) {
uint256 availableTokens = withdrawableTokens(investors[i]);
_priviToken.safeTransfer(investors[i], availableTokens);
}
}
| /// @dev release tokens to all the investors | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
3024,
3299
]
} | 2,708 | ||||
TeamVesting | contracts/TeamVesting.sol | 0x13d0526c393de67399f262b9ae19c77d067ec344 | Solidity | TeamVesting | contract TeamVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller);
event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation);
event InvestorRemoved(address... | addInvestors | function addInvestors(address[] calldata _investors, uint256[] calldata _tokenAllocations) external onlyOwner {
require(_investors.length == _tokenAllocations.length, "different arrays sizes");
for (uint256 i = 0; i < _investors.length; i++) {
_addInvestor(_investors[i], _tokenAllocations[i]);
}
... | /// @dev Adds investors. This function doesn't limit max gas consumption,
/// so adding too many investors can cause it to reach the out-of-gas error.
/// @param _investors The addresses of new investors.
/// @param _tokenAllocations The amounts of the tokens that belong to each investor. | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
3607,
4021
]
} | 2,709 | ||||
TeamVesting | contracts/TeamVesting.sol | 0x13d0526c393de67399f262b9ae19c77d067ec344 | Solidity | TeamVesting | contract TeamVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller);
event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation);
event InvestorRemoved(address... | setInitialTimestamp | function setInitialTimestamp(uint256 _timestamp) external onlyOwner() notInitialized() {
isInitialized = true;
_initialTimestamp = _timestamp;
}
| /// @dev The starting time of TGE
/// @param _timestamp The initial timestamp, this timestap should be used for vesting | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
4648,
4816
]
} | 2,710 | ||||
TeamVesting | contracts/TeamVesting.sol | 0x13d0526c393de67399f262b9ae19c77d067ec344 | Solidity | TeamVesting | contract TeamVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller);
event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation);
event InvestorRemoved(address... | withdrawableTokens | function withdrawableTokens(address _investor) public view returns (uint256 tokens) {
Investor storage investor = investorsInfo[_investor];
uint256 availablePercentage = _calculateAvailablePercentage();
uint256 noOfTokens = _calculatePercentage(investor.tokensAllotment, availablePercentage);
uint256 tok... | /// @dev withdrawble tokens for an address
/// @param _investor whitelisted investor address | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
4919,
5354
]
} | 2,711 | ||||
TeamVesting | contracts/TeamVesting.sol | 0x13d0526c393de67399f262b9ae19c77d067ec344 | Solidity | TeamVesting | contract TeamVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller);
event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation);
event InvestorRemoved(address... | _addInvestor | function _addInvestor(address _investor, uint256 _tokensAllotment) internal onlyOwner {
require(_investor != address(0), "Invalid address");
require(_tokensAllotment > 0, "the investor allocation must be more than 0");
Investor storage investor = investorsInfo[_investor];
require(investor.tokensAllotme... | /// @dev Adds investor. This function doesn't limit max gas consumption,
/// so adding too many investors can cause it to reach the out-of-gas error.
/// @param _investor The addresses of new investors.
/// @param _tokensAllotment The amounts of the tokens that belong to each investor. | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
5660,
6310
]
} | 2,712 | ||||
TeamVesting | contracts/TeamVesting.sol | 0x13d0526c393de67399f262b9ae19c77d067ec344 | Solidity | TeamVesting | contract TeamVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event InvestorsAdded(address[] investors, uint256[] tokenAllocations, address caller);
event InvestorAdded(address indexed investor, address indexed caller, uint256 allocation);
event InvestorRemoved(address... | _calculatePercentage | function _calculatePercentage(uint256 _amount, uint256 _percentage) private pure returns (uint256 percentage) {
return _amount.mul(_percentage).div(100).div(1e18);
}
| /// @dev calculate percentage value from amount
/// @param _amount amount input to find the percentage
/// @param _percentage percentage for an amount | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
6475,
6656
]
} | 2,713 | ||||
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
94,
154
]
} | 2,714 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
237,
310
]
} | 2,715 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
534,
616
]
} | 2,716 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
895,
983
]
} | 2,717 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
1647,
1726
]
} | 2,718 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
2039,
2141
]
} | 2,719 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
259,
445
]
} | 2,720 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
723,
864
]
} | 2,721 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
1162,
1359
]
} | 2,722 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
1613,
2089
]
} | 2,723 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
2560,
2697
]
} | 2,724 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
3188,
3471
]
} | 2,725 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
3931,
4066
]
} | 2,726 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
4546,
4717
]
} | 2,727 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | 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 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
606,
1230
]
} | 2,728 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | 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 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
2160,
2562
]
} | 2,729 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
3318,
3496
]
} | 2,730 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
3721,
3922
]
} | 2,731 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
4292,
4523
]
} | 2,732 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
4774,
5095
]
} | 2,733 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
902,
990
]
} | 2,734 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
1104,
1196
]
} | 2,735 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
1829,
1917
]
} | 2,736 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
1977,
2082
]
} | 2,737 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
2140,
2264
]
} | 2,738 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
2472,
2652
]
} | 2,739 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
2710,
2866
]
} | 2,740 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
3008,
3182
]
} | 2,741 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
3651,
3977
]
} | 2,742 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
4381,
4604
]
} | 2,743 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
5102,
5376
]
} | 2,744 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
5861,
6405
]
} | 2,745 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
6681,
7064
]
} | 2,746 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
7391,
7814
]
} | 2,747 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
8249,
8600
]
} | 2,748 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
8927,
9022
]
} | 2,749 |
ZksToken | ZksToken.sol | 0xe4815ae53b124e7263f08dcdbbb757d41ed658c6 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://05ecae0876fbfd0f1dead05d79e1a49610e0721c2d872be1d631451c3d8f8d8e | {
"func_code_index": [
9620,
9717
]
} | 2,750 |
Subrosa | Subrosa.sol | 0x1b85440d66a5903deabb24807d739019ff1741e6 | Solidity | Subrosa | contract Subrosa {
using SafeMath for uint256;
/*
This smart contract allows to collect ether in a
wallet and allow only the owner to withdraw it.
Initialize the wallet with owners address while deploying.
*/
// Events
// Deposit Event from the address
event Depo... | Subrosa | function Subrosa() public{
owner = 0x193129A669A6Fd24Fc261028570023e91F123573;
contractAddress = this;
}
| // Default constructor | LineComment | v0.4.22+commit.4cb486ee | bzzr://f0834b5524f29bbb73b0ffd9abe4f22c47063c15a5035b19c5adc5482fbb4ed3 | {
"func_code_index": [
713,
845
]
} | 2,751 | |||
Subrosa | Subrosa.sol | 0x1b85440d66a5903deabb24807d739019ff1741e6 | Solidity | Subrosa | contract Subrosa {
using SafeMath for uint256;
/*
This smart contract allows to collect ether in a
wallet and allow only the owner to withdraw it.
Initialize the wallet with owners address while deploying.
*/
// Events
// Deposit Event from the address
event Depo... | function () public payable {
emit Deposit(msg.sender, msg.value);
}
| // Send the ether to current address
// The fall back function to which the ether is sent | LineComment | v0.4.22+commit.4cb486ee | bzzr://f0834b5524f29bbb73b0ffd9abe4f22c47063c15a5035b19c5adc5482fbb4ed3 | {
"func_code_index": [
948,
1034
]
} | 2,752 | ||||
Subrosa | Subrosa.sol | 0x1b85440d66a5903deabb24807d739019ff1741e6 | Solidity | Subrosa | contract Subrosa {
using SafeMath for uint256;
/*
This smart contract allows to collect ether in a
wallet and allow only the owner to withdraw it.
Initialize the wallet with owners address while deploying.
*/
// Events
// Deposit Event from the address
event Depo... | withDraw | function withDraw() public onlyOwner () {
owner.transfer(contractAddress.balance);
emit WithDraw(owner, contractAddress.balance);
}
| // WithDraw all the ether only owner can withdraw | LineComment | v0.4.22+commit.4cb486ee | bzzr://f0834b5524f29bbb73b0ffd9abe4f22c47063c15a5035b19c5adc5482fbb4ed3 | {
"func_code_index": [
1092,
1251
]
} | 2,753 | |||
Subrosa | Subrosa.sol | 0x1b85440d66a5903deabb24807d739019ff1741e6 | Solidity | Subrosa | contract Subrosa {
using SafeMath for uint256;
/*
This smart contract allows to collect ether in a
wallet and allow only the owner to withdraw it.
Initialize the wallet with owners address while deploying.
*/
// Events
// Deposit Event from the address
event Depo... | withDrawAmount | function withDrawAmount(uint256 amount) public onlyOwner{
require(amount <= contractAddress.balance);
owner.transfer(amount);
emit WithDraw(owner, amount);
}
| // WithDraw a specific amount in wei
// @param amount the amount to be withdrawn | LineComment | v0.4.22+commit.4cb486ee | bzzr://f0834b5524f29bbb73b0ffd9abe4f22c47063c15a5035b19c5adc5482fbb4ed3 | {
"func_code_index": [
1345,
1539
]
} | 2,754 | |||
Subrosa | Subrosa.sol | 0x1b85440d66a5903deabb24807d739019ff1741e6 | Solidity | Subrosa | contract Subrosa {
using SafeMath for uint256;
/*
This smart contract allows to collect ether in a
wallet and allow only the owner to withdraw it.
Initialize the wallet with owners address while deploying.
*/
// Events
// Deposit Event from the address
event Depo... | getBalance | function getBalance() public constant returns(uint256 balance){
return contractAddress.balance;
}
| // Check the current balance of the contract
// @returns balance returns the current balance of wallet | LineComment | v0.4.22+commit.4cb486ee | bzzr://f0834b5524f29bbb73b0ffd9abe4f22c47063c15a5035b19c5adc5482fbb4ed3 | {
"func_code_index": [
1655,
1771
]
} | 2,755 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | 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;
}... | 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.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
261,
321
]
} | 2,756 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | 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;
}... | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
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.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
644,
820
]
} | 2,757 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | iERC20Token | contract iERC20Token {
uint256 public totalSupply = 0;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public view returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance);
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
166,
244
]
} | 2,758 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | iERC20Token | contract iERC20Token {
uint256 public totalSupply = 0;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public view returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @... | transfer | function transfer(address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
481,
563
]
} | 2,759 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | iERC20Token | contract iERC20Token {
uint256 public totalSupply = 0;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public view returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
886,
987
]
} | 2,760 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | iERC20Token | contract iERC20Token {
uint256 public totalSupply = 0;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public view returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @... | approve | function approve(address _spender, uint256 _value) public returns (bool success);
| /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
1277,
1363
]
} | 2,761 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | iERC20Token | contract iERC20Token {
uint256 public totalSupply = 0;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public view returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @... | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining);
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
1571,
1669
]
} | 2,762 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | StandardToken | contract StandardToken is iERC20Token {
using SafeMath for uint256;
mapping(address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
function transfer(address _to, uint _value) public returns (bool success) {
require(_to != address(0));
require(_value ... | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
1832,
2121
]
} | 2,763 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | FreezableToken | contract FreezableToken is iERC223Token, StandardToken, Ownable {
event ContractTransfer(address indexed _from, address indexed _to, uint _value, bytes _data);
bool public freezed;
modifier canTransfer(address _transferer) {
require(owner == _transferer || !freezed);
_;
}
... | contractFallback | function contractFallback(address _origin, address _to, uint _value, bytes _data) private returns (bool) {
ContractTransfer(_origin, _to, _value, _data);
ERC223Receiver reciever = ERC223Receiver(_to);
require(reciever.tokenFallback(_origin, _value, _data));
return true;
}
| //function that is called when transaction target is a contract | LineComment | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
1682,
2000
]
} | 2,764 | |||
DebitumToken | DebitumToken.sol | 0x151202c9c18e495656f372281f493eb7698961d5 | Solidity | FreezableToken | contract FreezableToken is iERC223Token, StandardToken, Ownable {
event ContractTransfer(address indexed _from, address indexed _to, uint _value, bytes _data);
bool public freezed;
modifier canTransfer(address _transferer) {
require(owner == _transferer || !freezed);
_;
}
... | isContract | function isContract(address _addr) private view returns (bool is_contract) {
uint length;
assembly { length := extcodesize(_addr) }
return length > 0;
}
| //assemble the given address bytecode. If bytecode exists then the _addr is a contract. | LineComment | v0.4.18+commit.9cf6e910 | bzzr://17a8528c91e34bd0e06d8187306573c7a476a20d07c9ce914f43c9b87cfbe5c1 | {
"func_code_index": [
2096,
2285
]
} | 2,765 | |||
UniqGenerator | ./contracts/UniqGenerator2.sol | 0xb1e9cff95de0681adc3d658df462052512c6dedb | Solidity | UniqGenerator | contract UniqGenerator is ERC721Tradable{
// ----- VARIABLES ----- //
uint256 internal _verificationPrice;
address internal _tokenForPaying;
string public METADATA_PROVENANCE_HASH;
uint256 public immutable ROYALTY_FEE;
string internal _token_uri;
mapping(bytes32 => bool) internal _isItemMint... | payForVerification | function payForVerification(bytes32 _itemHash) external {
require(!_isItemMinted[_itemHash], "Already minted");
require(
_verificationRequester[_itemHash] == address(0),
"Verification already requested"
);
require(
IERC20(_tokenForPaying).transferFrom(
msg.sender,
... | // ----- PUBLIC METHODS ----- // | LineComment | v0.8.6+commit.11564f7e | None | ipfs://8684d54a22c734896df6299361d52ced1d6d29a3d3f98e0413f94190e5a256b7 | {
"func_code_index": [
4466,
4971
]
} | 2,766 | ||
UniqGenerator | ./contracts/UniqGenerator2.sol | 0xb1e9cff95de0681adc3d658df462052512c6dedb | Solidity | UniqGenerator | contract UniqGenerator is ERC721Tradable{
// ----- VARIABLES ----- //
uint256 internal _verificationPrice;
address internal _tokenForPaying;
string public METADATA_PROVENANCE_HASH;
uint256 public immutable ROYALTY_FEE;
string internal _token_uri;
mapping(bytes32 => bool) internal _isItemMint... | setProvenanceHash | function setProvenanceHash(string memory _hash) external onlyOwner {
METADATA_PROVENANCE_HASH = _hash;
}
| // ----- OWNERS METHODS ----- // | LineComment | v0.8.6+commit.11564f7e | None | ipfs://8684d54a22c734896df6299361d52ced1d6d29a3d3f98e0413f94190e5a256b7 | {
"func_code_index": [
5573,
5693
]
} | 2,767 | ||
_goatgauds | contracts/goadgauds.sol | 0x5cebe5cde01ab154fb46b7984d6354da367bcbaf | Solidity | _goatgauds | contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool publ... | //public view | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://efc6e995f9113dd9e7553b8bfdbd720d3ba65ba918ce8660b957b3e9434d2079 | {
"func_code_index": [
1110,
1143
]
} | 2,768 | ||||
_goatgauds | contracts/goadgauds.sol | 0x5cebe5cde01ab154fb46b7984d6354da367bcbaf | Solidity | _goatgauds | contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool publ... | presale | function presale( uint quantity ) external payable {
require( isPresaleActive, "Presale is not active" );
require( quantity <= MAX_ORDER, "Order too big" );
require( msg.value >= PRESALE_PRICE * quantity, "Ether sent is not correct" );
require( accessList[msg.sender] > ... | //public payable | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://efc6e995f9113dd9e7553b8bfdbd720d3ba65ba918ce8660b957b3e9434d2079 | {
"func_code_index": [
1414,
2025
]
} | 2,769 | ||
_goatgauds | contracts/goadgauds.sol | 0x5cebe5cde01ab154fb46b7984d6354da367bcbaf | Solidity | _goatgauds | contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool publ... | burnFrom | function burnFrom( address owner, uint[] calldata tokenIds ) external payable onlyDelegates{
for(uint i; i < tokenIds.length; ++i ){
require( _exists( tokenIds[i] ), "Burn for nonexistent token" );
require( _owners[ tokenIds[i] ] == owner, "Owner mismatch" );
_burn( tokenIds[i] );
}
}
| //delegated payable | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://efc6e995f9113dd9e7553b8bfdbd720d3ba65ba918ce8660b957b3e9434d2079 | {
"func_code_index": [
2546,
2868
]
} | 2,770 | ||
_goatgauds | contracts/goadgauds.sol | 0x5cebe5cde01ab154fb46b7984d6354da367bcbaf | Solidity | _goatgauds | contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool publ... | resurrect | function resurrect( uint[] calldata tokenIds, address[] calldata recipients ) external onlyDelegates{
require(tokenIds.length == recipients.length, "Must provide equal tokenIds and recipients" );
address to;
uint tokenId;
address zero = address(0);
for(uint i; i < tokenIds.length; ++i ){
to = re... | //delegated nonpayable | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://efc6e995f9113dd9e7553b8bfdbd720d3ba65ba918ce8660b957b3e9434d2079 | {
"func_code_index": [
3492,
4174
]
} | 2,771 | ||
_goatgauds | contracts/goadgauds.sol | 0x5cebe5cde01ab154fb46b7984d6354da367bcbaf | Solidity | _goatgauds | contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool publ... | addPayee | function addPayee(address account, uint256 shares_) external onlyOwner {
_addPayee(account, shares_);
}
| //owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://efc6e995f9113dd9e7553b8bfdbd720d3ba65ba918ce8660b957b3e9434d2079 | {
"func_code_index": [
5555,
5669
]
} | 2,772 | ||
_goatgauds | contracts/goadgauds.sol | 0x5cebe5cde01ab154fb46b7984d6354da367bcbaf | Solidity | _goatgauds | contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool publ... | _burn | function _burn(uint tokenId) internal override {
address curOwner = ERC721B.ownerOf(tokenId);
// Clear approvals
_approve(owner(), tokenId);
_owners[tokenId] = address(0);
emit Transfer(curOwner, address(0), tokenId);
}
| //internal | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://efc6e995f9113dd9e7553b8bfdbd720d3ba65ba918ce8660b957b3e9434d2079 | {
"func_code_index": [
5827,
6079
]
} | 2,773 | ||
Crowdsale | Crowdsale.sol | 0x3c047c238fd1dc6cb23317f5e533f35c57059ee6 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 1818;
token tokenReward;
// mapping (address => uint) public co... | function () payable {
buyTokens(msg.sender,"");
}
| // fallback function can be used to buy tokens | LineComment | v0.4.23+commit.124ca40d | bzzr://0a86b02a41be51d27c341dd592d389da93eabf168d279edbf725d4aa32af6de1 | {
"func_code_index": [
1929,
1989
]
} | 2,774 | ||||
Crowdsale | Crowdsale.sol | 0x3c047c238fd1dc6cb23317f5e533f35c57059ee6 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 1818;
token tokenReward;
// mapping (address => uint) public co... | buyTokens | function buyTokens(address beneficiary, bytes32 promoCode) payable {
require(beneficiary != 0x0);
require(validPurchase());
uint256 weiAmount = msg.value;
// if(weiAmount < 10**16) throw;
// if(weiAmount > 50*10**18) throw;
// calculate token amount to be sent
uint256 tokens = (weiAmount) * p... | // low level token purchase function | LineComment | v0.4.23+commit.124ca40d | bzzr://0a86b02a41be51d27c341dd592d389da93eabf168d279edbf725d4aa32af6de1 | {
"func_code_index": [
2032,
2920
]
} | 2,775 | |||
Crowdsale | Crowdsale.sol | 0x3c047c238fd1dc6cb23317f5e533f35c57059ee6 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 1818;
token tokenReward;
// mapping (address => uint) public co... | forwardFunds | function forwardFunds() internal {
// wallet.transfer(msg.value);
if (!wallet.send(msg.value)) {
throw;
}
}
| // send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms | LineComment | v0.4.23+commit.124ca40d | bzzr://0a86b02a41be51d27c341dd592d389da93eabf168d279edbf725d4aa32af6de1 | {
"func_code_index": [
3029,
3164
]
} | 2,776 | |||
Crowdsale | Crowdsale.sol | 0x3c047c238fd1dc6cb23317f5e533f35c57059ee6 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
uint256 public price = 1818;
token tokenReward;
// mapping (address => uint) public co... | validPurchase | function validPurchase() internal constant returns (bool) {
bool withinPeriod = started;
bool nonZeroPurchase = msg.value != 0;
return withinPeriod && nonZeroPurchase;
}
| // @return true if the transaction can buy tokens | LineComment | v0.4.23+commit.124ca40d | bzzr://0a86b02a41be51d27c341dd592d389da93eabf168d279edbf725d4aa32af6de1 | {
"func_code_index": [
3220,
3410
]
} | 2,777 | |||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
//... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Multiplies two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
96,
534
]
} | 2,778 |
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
//... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0); // Solidity only automatically asserts 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, reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
652,
951
]
} | 2,779 |
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
//... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
1072,
1227
]
} | 2,780 |
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
//... | /**
* @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;
require(c >= a);
return c;
}
| /**
* @dev Adds two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
1298,
1453
]
} | 2,781 |
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
//... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
1596,
1725
]
} | 2,782 |
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
//... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | ceil | function ceil(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
if(a % b == 0) {
return c;
}
else {
return c + 1;
}
}
| /**
* @dev Returns ceil(a / b).
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
1778,
2001
]
} | 2,783 |
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | BaseLogic | contract BaseLogic {
bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32";
mapping (address => uint256) keyNonce;
AccountStorage public accountStorage;
modifier allowSelfCallsOnly() {
require (msg.sender == address(this), "only internal call is allowed");
... | initAccount | function initAccount(Account _account) external allowAccountCallsOnly(_account){
emit LogicInitialised(address(_account));
}
| // *************** Initialization ********************* // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
779,
922
]
} | 2,784 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | BaseLogic | contract BaseLogic {
bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32";
mapping (address => uint256) keyNonce;
AccountStorage public accountStorage;
modifier allowSelfCallsOnly() {
require (msg.sender == address(this), "only internal call is allowed");
... | getKeyNonce | function getKeyNonce(address _key) external view returns(uint256) {
return keyNonce[_key];
}
| // *************** Getter ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
984,
1095
]
} | 2,785 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | BaseLogic | contract BaseLogic {
bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32";
mapping (address => uint256) keyNonce;
AccountStorage public accountStorage;
modifier allowSelfCallsOnly() {
require (msg.sender == address(this), "only internal call is allowed");
... | getSignHash | function getSignHash(bytes memory _data, uint256 _nonce) internal view returns(bytes32) {
// use EIP 191
// 0x1900 + this logic address + data + nonce of signing key
bytes32 msgHash = keccak256(abi.encodePacked(byte(0x19), byte(0), address(this), _data, _nonce));
bytes32 prefixedHash = keccak256(abi... | // *************** Signature ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
1160,
1580
]
} | 2,786 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | BaseLogic | contract BaseLogic {
bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32";
mapping (address => uint256) keyNonce;
AccountStorage public accountStorage;
modifier allowSelfCallsOnly() {
require (msg.sender == address(this), "only internal call is allowed");
... | recover | function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
// Check the signature length
if (signature.length != 65) {
return (address(0));
}
// Divide the signature in r, s and v variables
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover tak... | /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half ord... | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
2905,
4837
]
} | 2,787 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | BaseLogic | contract BaseLogic {
bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32";
mapping (address => uint256) keyNonce;
AccountStorage public accountStorage;
modifier allowSelfCallsOnly() {
require (msg.sender == address(this), "only internal call is allowed");
... | getSignerAddress | function getSignerAddress(bytes memory _b) internal pure returns (address _a) {
require(_b.length >= 36, "invalid bytes");
// solium-disable-next-line security/no-inline-assembly
assembly {
let mask := 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
_a := and(mask, mload(add(_b, 36)))
... | /* get signer address from data
* @dev Gets an address encoded as the first argument in transaction data
* @param b The byte array that should have an address as first argument
* @returns a The address retrieved from the array
*/ | Comment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
5095,
5776
]
} | 2,788 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | BaseLogic | contract BaseLogic {
bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32";
mapping (address => uint256) keyNonce;
AccountStorage public accountStorage;
modifier allowSelfCallsOnly() {
require (msg.sender == address(this), "only internal call is allowed");
... | getMethodId | function getMethodId(bytes memory _b) internal pure returns (bytes4 _a) {
require(_b.length >= 4, "invalid data");
// solium-disable-next-line security/no-inline-assembly
assembly {
// 32 bytes is the length of the bytes array
_a := mload(add(_b, 32))
}
}
| // get method id, first 4 bytes of data | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
5824,
6151
]
} | 2,789 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | BaseLogic | contract BaseLogic {
bytes constant internal SIGN_HASH_PREFIX = "\x19Ethereum Signed Message:\n32";
mapping (address => uint256) keyNonce;
AccountStorage public accountStorage;
modifier allowSelfCallsOnly() {
require (msg.sender == address(this), "only internal call is allowed");
... | checkAndUpdateNonce | function checkAndUpdateNonce(address _key, uint256 _nonce) internal {
require(_nonce > keyNonce[_key], "nonce too small");
require(SafeMath.div(_nonce, 1000000) <= now + 86400, "nonce too big"); // 86400=24*3600 seconds
keyNonce[_key] = _nonce;
}
| // _nonce is timestamp in microsecond(1/1000000 second) | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
6463,
6748
]
} | 2,790 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | Owned | contract Owned {
// The owner
address public owner;
event OwnerChanged(address indexed _newOwner);
/**
* @dev Throws if the sender is not the owner.
*/
modifier onlyOwner {
require(msg.sender == owner, "Must be owner");
_;
}
constructor() public {... | changeOwner | function changeOwner(address _newOwner) external onlyOwner {
require(_newOwner != address(0), "Address must not be null");
owner = _newOwner;
emit OwnerChanged(_newOwner);
}
| /**
* @dev Lets the owner transfer ownership of the contract to a new owner.
* @param _newOwner The new owner.
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
497,
707
]
} | 2,791 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | AccountStorage | contract AccountStorage {
modifier allowAccountCallsOnly(Account _account) {
require(msg.sender == address(_account), "caller must be account");
_;
}
modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) {
require(LogicManager(Account(_account).manager()... | getOperationKeyCount | function getOperationKeyCount(address _account) external view returns(uint256) {
return operationKeyCount[_account];
}
| // *************** keyCount ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
1653,
1790
]
} | 2,792 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | AccountStorage | contract AccountStorage {
modifier allowAccountCallsOnly(Account _account) {
require(msg.sender == address(_account), "caller must be account");
_;
}
modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) {
require(LogicManager(Account(_account).manager()... | getKeyData | function getKeyData(address _account, uint256 _index) public view returns(address) {
KeyItem memory item = keyData[_account][_index];
return item.pubKey;
}
| // *************** keyData ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
2051,
2234
]
} | 2,793 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | AccountStorage | contract AccountStorage {
modifier allowAccountCallsOnly(Account _account) {
require(msg.sender == address(_account), "caller must be account");
_;
}
modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) {
require(LogicManager(Account(_account).manager()... | getKeyStatus | function getKeyStatus(address _account, uint256 _index) external view returns(uint256) {
KeyItem memory item = keyData[_account][_index];
return item.status;
}
| // *************** keyStatus ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
2597,
2784
]
} | 2,794 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | AccountStorage | contract AccountStorage {
modifier allowAccountCallsOnly(Account _account) {
require(msg.sender == address(_account), "caller must be account");
_;
}
modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) {
require(LogicManager(Account(_account).manager()... | getBackupAddress | function getBackupAddress(address _account, uint256 _index) external view returns(address) {
BackupAccount memory b = backupData[_account][_index];
return b.backup;
}
| // *************** backupData ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
3096,
3290
]
} | 2,795 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | AccountStorage | contract AccountStorage {
modifier allowAccountCallsOnly(Account _account) {
require(msg.sender == address(_account), "caller must be account");
_;
}
modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) {
require(LogicManager(Account(_account).manager()... | getDelayDataHash | function getDelayDataHash(address payable _account, bytes4 _actionId) external view returns(bytes32) {
DelayItem memory item = delayData[_account][_actionId];
return item.hash;
}
| // *************** delayData ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
4617,
4823
]
} | 2,796 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | AccountStorage | contract AccountStorage {
modifier allowAccountCallsOnly(Account _account) {
require(msg.sender == address(_account), "caller must be account");
_;
}
modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) {
require(LogicManager(Account(_account).manager()... | getProposalDataHash | function getProposalDataHash(address _client, address _proposer, bytes4 _actionId) external view returns(bytes32) {
Proposal memory p = proposalData[_client][_proposer][_actionId];
return p.hash;
}
| // *************** proposalData ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
5597,
5822
]
} | 2,797 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | AccountStorage | contract AccountStorage {
modifier allowAccountCallsOnly(Account _account) {
require(msg.sender == address(_account), "caller must be account");
_;
}
modifier allowAuthorizedLogicContractsCallsOnly(address payable _account) {
require(LogicManager(Account(_account).manager()... | initAccount | function initAccount(Account _account, address[] calldata _keys, address[] calldata _backups)
external
allowAccountCallsOnly(_account)
{
require(getKeyData(address(_account), 0) == address(0), "AccountStorage: account already initialized!");
require(_keys.length > 0, "empty keys array");
ope... | // *************** init ********************** // | LineComment | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
7152,
8738
]
} | 2,798 | ||
Account | Account.sol | 0x2ed747ed395cfd40ff750fdfa351b229d67c8c01 | Solidity | Account | contract Account {
// The implementation of the proxy
address public implementation;
// Logic manager
address public manager;
// The enabled static calls
mapping (bytes4 => address) public enabled;
event EnabledStaticCall(address indexed module, bytes4 indexed method);
... | enableStaticCall | function enableStaticCall(address _module, bytes4 _method) external allowAuthorizedLogicContractsCallsOnly {
enabled[_method] = _module;
emit EnabledStaticCall(_module, _method);
}
| /**
* @dev Enables a static method by specifying the target module to which the call must be delegated.
* @param _module The target module.
* @param _method The static method signature.
*/ | NatSpecMultiLine | v0.5.4+commit.9549d8ff | GNU GPLv3 | bzzr://325ab23acf652cf963ee273c31a40feb195010aef23c1acf8f2f424fa1bd1a26 | {
"func_code_index": [
2193,
2401
]
} | 2,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.