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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AccessControlledAggregator | AccessControlledAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | AccessControlledAggregator | contract AccessControlledAggregator is FluxAggregator, SimpleReadAccessController {
/**
* @notice set up the aggregator with initial configuration
* @param _link The address of the LINK token
* @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
... | /**
* @title AccessControlled FluxAggregator contract
* @notice This contract requires addresses to be added to a controller
* in order to read the answers stored in the FluxAggregator contract
*/ | NatSpecMultiLine | getTimestamp | function getTimestamp(uint256 _roundId)
public
view
override
checkAccess()
returns (uint256)
{
return super.getTimestamp(_roundId);
}
| /**
* @notice get timestamp when an answer was last updated
* @dev overridden funcion to add the checkAccess() modifier
* @param _roundId the round number to retrieve the updated timestamp for
*
* @dev #[deprecated] Use getRoundData instead. This does not error if no
* answer has been reached, it will simply retu... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
7165,
7328
]
} | 7,000 | |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | registerManyUsersExternal | function registerManyUsersExternal(address[] calldata _addresses, uint256 _validUntilTime)
external onlyOperator returns (bool)
{
for (uint256 i = 0; i < _addresses.length; i++) {
registerUserPrivate(_addresses[i], _validUntilTime);
}
return true;
}
| /**
* @dev register many users
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
814,
1099
]
} | 7,001 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | registerManyUsersFullExternal | function registerManyUsersFullExternal(
address[] calldata _addresses,
uint256 _validUntilTime,
uint256[] calldata _values) external onlyOperator returns (bool)
{
require(_values.length <= extendedKeys_.length, "UR08");
for (uint256 i = 0; i < _addresses.length; i++) {
registerUserPrivate(_addresse... | /**
* @dev register many users
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
1147,
1592
]
} | 7,002 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | attachManyAddressesExternal | function attachManyAddressesExternal(
uint256[] calldata _userIds,
address[] calldata _addresses)
external onlyOperator returns (bool)
{
require(_addresses.length == _userIds.length, "UR03");
for (uint256 i = 0; i < _addresses.length; i++) {
attachAddress(_userIds[i], _addresses[i]);
}
return... | /**
* @dev attach many addresses to many users
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
1656,
2008
]
} | 7,003 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | detachManyAddressesExternal | function detachManyAddressesExternal(address[] calldata _addresses)
external onlyOperator returns (bool)
{
for (uint256 i = 0; i < _addresses.length; i++) {
detachAddressPrivate(_addresses[i]);
}
return true;
}
| /**
* @dev detach many addresses association between addresses and their respective users
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
2115,
2361
]
} | 7,004 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | suspendManyUsersExternal | function suspendManyUsersExternal(uint256[] calldata _userIds)
external onlyOperator returns (bool)
{
for (uint256 i = 0; i < _userIds.length; i++) {
suspendUser(_userIds[i]);
}
return true;
}
| /**
* @dev suspend many users
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
2408,
2636
]
} | 7,005 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | restoreManyUsersExternal | function restoreManyUsersExternal(uint256[] calldata _userIds)
external onlyOperator returns (bool)
{
for (uint256 i = 0; i < _userIds.length; i++) {
restoreUser(_userIds[i]);
}
return true;
}
| /**
* @dev restore many users
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
2683,
2911
]
} | 7,006 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateManyUsersExternal | function updateManyUsersExternal(
uint256[] calldata _userIds,
uint256 _validUntilTime,
bool _suspended) external onlyOperator returns (bool)
{
for (uint256 i = 0; i < _userIds.length; i++) {
updateUser(_userIds[i], _validUntilTime, _suspended);
}
return true;
}
| /**
* @dev update many users
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
2957,
3265
]
} | 7,007 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateManyUsersExtendedExternal | function updateManyUsersExtendedExternal(
uint256[] calldata _userIds,
uint256 _key, uint256 _value) external onlyOperator returns (bool)
{
for (uint256 i = 0; i < _userIds.length; i++) {
updateUserExtended(_userIds[i], _key, _value);
}
return true;
}
| /**
* @dev update many user extended informations
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
3332,
3624
]
} | 7,008 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateManyUsersAllExtendedExternal | function updateManyUsersAllExtendedExternal(
uint256[] calldata _userIds,
uint256[] calldata _values) external onlyOperator returns (bool)
{
require(_values.length <= extendedKeys_.length, "UR08");
for (uint256 i = 0; i < _userIds.length; i++) {
updateUserExtendedPrivate(_userIds[i], _values);
}
... | /**
* @dev update many user all extended informations
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
3695,
4052
]
} | 7,009 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateManyUsersFullExternal | function updateManyUsersFullExternal(
uint256[] calldata _userIds,
uint256 _validUntilTime,
bool _suspended,
uint256[] calldata _values) external onlyOperator returns (bool)
{
require(_values.length <= extendedKeys_.length, "UR08");
for (uint256 i = 0; i < _userIds.length; i++) {
updateUser(_use... | /**
* @dev update many users full
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
4103,
4566
]
} | 7,010 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return name_;
}
| /**
* @dev user registry name
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
4613,
4693
]
} | 7,011 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | currency | function currency() public view returns (bytes32) {
return currency_;
}
| /**
* @dev user registry currency
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
4744,
4826
]
} | 7,012 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | userCount | function userCount() public view returns (uint256) {
return userCount_;
}
| /**
* @dev number of user registered
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
4880,
4964
]
} | 7,013 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | userId | function userId(address _address) public view returns (uint256) {
return walletOwners[_address];
}
| /**
* @dev the userId associated to the provided address
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
5038,
5147
]
} | 7,014 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | validUserId | function validUserId(address _address) public view returns (uint256) {
uint256 addressUserId = walletOwners[_address];
if (isValidPrivate(users[addressUserId])) {
return addressUserId;
}
return 0;
}
| /**
* @dev the userId associated to the provided address if the user is valid
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
5242,
5473
]
} | 7,015 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | validUser | function validUser(address _address, uint256[] memory _keys) public view returns (uint256, uint256[] memory) {
uint256 addressUserId = walletOwners[_address];
if (isValidPrivate(users[addressUserId])) {
uint256[] memory values = new uint256[](_keys.length);
for (uint256 i=0; i < _keys.length; i++) {
... | /**
* @dev the user associated to the provided address if the user is valid
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
5566,
6050
]
} | 7,016 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | validity | function validity(uint256 _userId) public view returns (uint256, bool) {
User memory user = users[_userId];
return (user.validUntilTime, user.suspended);
}
| /**
* @dev returns the time at which user validity ends
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
6123,
6294
]
} | 7,017 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | extendedKeys | function extendedKeys() public view returns (uint256[] memory) {
return extendedKeys_;
}
| /**
* @dev extended keys
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
6336,
6435
]
} | 7,018 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | extended | function extended(uint256 _userId, uint256 _key)
public view returns (uint256)
{
return users[_userId].extended[_key];
}
| /**
* @dev access to extended user data
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
6492,
6631
]
} | 7,019 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | manyExtended | function manyExtended(uint256 _userId, uint256[] memory _keys)
public view returns (uint256[] memory values)
{
values = new uint256[](_keys.length);
for (uint256 i=0; i < _keys.length; i++) {
values[i] = users[_userId].extended[_keys[i]];
}
}
| /**
* @dev access to extended user data
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
6688,
6966
]
} | 7,020 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | isAddressValid | function isAddressValid(address _address) public view returns (bool) {
return isValidPrivate(users[walletOwners[_address]]);
}
| /**
* @dev validity of the current user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
7023,
7160
]
} | 7,021 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | isValid | function isValid(uint256 _userId) public view returns (bool) {
return isValidPrivate(users[_userId]);
}
| /**
* @dev validity of the current user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
7217,
7331
]
} | 7,022 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | defineExtendedKeys | function defineExtendedKeys(uint256[] memory _extendedKeys)
public onlyOperator returns (bool)
{
extendedKeys_ = _extendedKeys;
emit ExtendedKeysDefinition(_extendedKeys);
return true;
}
| /**
* @dev define extended keys
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
7380,
7595
]
} | 7,023 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | registerUser | function registerUser(address _address, uint256 _validUntilTime)
public onlyOperator returns (bool)
{
registerUserPrivate(_address, _validUntilTime);
return true;
}
| /**
* @dev register a user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
7639,
7827
]
} | 7,024 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | registerUserFull | function registerUserFull(
address _address,
uint256 _validUntilTime,
uint256[] memory _values) public onlyOperator returns (bool)
{
require(_values.length <= extendedKeys_.length, "UR08");
registerUserPrivate(_address, _validUntilTime);
updateUserExtendedPrivate(userCount_, _values);
return true;... | /**
* @dev register a user full
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
7876,
8220
]
} | 7,025 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | attachAddress | function attachAddress(uint256 _userId, address _address)
public onlyOperator returns (bool)
{
require(_userId > 0 && _userId <= userCount_, "UR01");
require(walletOwners[_address] == 0, "UR02");
walletOwners[_address] = _userId;
emit AddressAttached(_userId, _address);
return true;
}
| /**
* @dev attach an address with a user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
8278,
8604
]
} | 7,026 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | detachAddress | function detachAddress(address _address)
public onlyOperator returns (bool)
{
detachAddressPrivate(_address);
return true;
}
| /**
* @dev detach the association between an address and its user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
8687,
8835
]
} | 7,027 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | detachSelf | function detachSelf() public returns (bool) {
detachAddressPrivate(msg.sender);
return true;
}
| /**
* @dev detach the association between an address and its user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
8918,
9028
]
} | 7,028 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | detachSelfAddress | function detachSelfAddress(address _address)
public returns (bool)
{
require(
walletOwners[_address] == walletOwners[msg.sender],
"UR05");
detachAddressPrivate(_address);
return true;
}
| /**
* @dev detach the association between an address and its user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
9111,
9339
]
} | 7,029 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | suspendUser | function suspendUser(uint256 _userId)
public onlyOperator returns (bool)
{
require(_userId > 0 && _userId <= userCount_, "UR01");
require(!users[_userId].suspended, "UR06");
users[_userId].suspended = true;
emit UserSuspended(_userId);
return true;
}
| /**
* @dev suspend a user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
9382,
9671
]
} | 7,030 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | restoreUser | function restoreUser(uint256 _userId)
public onlyOperator returns (bool)
{
require(_userId > 0 && _userId <= userCount_, "UR01");
require(users[_userId].suspended, "UR07");
users[_userId].suspended = false;
emit UserRestored(_userId);
return true;
}
| /**
* @dev restore a user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
9714,
10002
]
} | 7,031 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateUser | function updateUser(
uint256 _userId,
uint256 _validUntilTime,
bool _suspended) public onlyOperator returns (bool)
{
require(_userId > 0 && _userId <= userCount_, "UR01");
if (users[_userId].validUntilTime != _validUntilTime) {
users[_userId].validUntilTime = _validUntilTime;
emit UserValidity... | /**
* @dev update a user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
10044,
10671
]
} | 7,032 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateUserExtended | function updateUserExtended(uint256 _userId, uint256 _key, uint256 _value)
public onlyOperator returns (bool)
{
require(_userId > 0 && _userId <= userCount_, "UR01");
users[_userId].extended[_key] = _value;
emit UserExtendedKey(_userId, _key, _value);
return true;
}
| /**
* @dev update user extended information
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
10732,
11032
]
} | 7,033 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateUserAllExtended | function updateUserAllExtended(
uint256 _userId,
uint256[] memory _values) public onlyOperator returns (bool)
{
require(_values.length <= extendedKeys_.length, "UR08");
updateUserExtendedPrivate(_userId, _values);
return true;
}
| /**
* @dev update user all extended information
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
11097,
11359
]
} | 7,034 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateUserFull | function updateUserFull(
uint256 _userId,
uint256 _validUntilTime,
bool _suspended,
uint256[] memory _values) public onlyOperator returns (bool)
{
require(_values.length <= extendedKeys_.length, "UR08");
updateUser(_userId, _validUntilTime, _suspended);
updateUserExtendedPrivate(_userId, _values);... | /**
* @dev update a user full
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
11406,
11768
]
} | 7,035 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | registerUserPrivate | function registerUserPrivate(address _address, uint256 _validUntilTime)
private
{
require(walletOwners[_address] == 0, "UR03");
users[++userCount_] = User(_validUntilTime, false);
walletOwners[_address] = userCount_;
emit UserRegistered(userCount_, _address, _validUntilTime);
}
| /**
* @dev register a user private
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
11820,
12134
]
} | 7,036 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | updateUserExtendedPrivate | function updateUserExtendedPrivate(uint256 _userId, uint256[] memory _values)
private
{
require(_userId > 0 && _userId <= userCount_, "UR01");
for (uint256 i = 0; i < _values.length; i++) {
users[_userId].extended[extendedKeys_[i]] = _values[i];
}
emit UserExtendedKeys(_userId, _values);
}
| /**
* @dev update user extended private
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
12191,
12522
]
} | 7,037 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | detachAddressPrivate | function detachAddressPrivate(address _address) private {
uint256 addressUserId = walletOwners[_address];
require(addressUserId != 0, "UR04");
emit AddressDetached(addressUserId, _address);
delete walletOwners[_address];
}
| /**
* @dev detach the association between an address and its user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
12605,
12853
]
} | 7,038 |
UserRegistry | contracts/UserRegistry.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | UserRegistry | contract UserRegistry is IUserRegistry, Operable {
struct User {
uint256 validUntilTime;
bool suspended;
mapping(uint256 => uint256) extended;
}
uint256[] internal extendedKeys_ = [ 0, 1, 2 ];
mapping(uint256 => User) internal users;
mapping(address => uint256) internal walletOwners;
... | /**
* @title UserRegistry
* @dev UserRegistry contract
* Configure and manage users
* Extended may be used externaly to store data within a user context
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* UR01: UserId is invalid
* UR02: WalletOwner is already known
* UR03:... | NatSpecMultiLine | isValidPrivate | function isValidPrivate(User storage user) private view returns (bool) {
// solhint-disable-next-line not-rely-on-time
return !user.suspended && user.validUntilTime > now;
}
| /**
* @dev validity of the current user
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
12910,
13099
]
} | 7,039 |
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | tokenAddress | function tokenAddress() external view returns (address token);
| // Address of ERC20 token sold on this exchange | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
90,
157
]
} | 7,040 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | factoryAddress | function factoryAddress() external view returns (address factory);
| // Address of Uniswap Factory | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
193,
264
]
} | 7,041 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | addLiquidity | function addLiquidity(uint256 min_liquidity, uint256 max_tokens, uint256 deadline) external payable returns (uint256);
| // Provide Liquidity | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
291,
414
]
} | 7,042 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | getEthToTokenInputPrice | function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought);
| // Get Prices | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
572,
674
]
} | 7,043 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | ethToTokenSwapInput | function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought);
| // Trade ETH to ERC20 | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
1013,
1135
]
} | 7,044 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | tokenToEthSwapInput | function tokenToEthSwapInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline) external returns (uint256 eth_bought);
| // Trade ERC20 to ETH | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
1576,
1705
]
} | 7,045 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | tokenToTokenSwapInput | function tokenToTokenSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr) external returns (uint256 tokens_bought);
| // Trade ERC20 to ERC20 | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
2179,
2367
]
} | 7,046 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | tokenToExchangeSwapInput | function tokenToExchangeSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address exchange_addr) external returns (uint256 tokens_bought);
| // Trade ERC20 to Custom Pool | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
3010,
3204
]
} | 7,047 | ||
BuyMoreShitCoinTradeExample | BuyMoreShitCoinTradeExample.sol | 0xd826ec7f2b7a488701b4f4dab1f12fbf69cbb7aa | Solidity | UniswapExchangeInterface | contract UniswapExchangeInterface {
// Address of ERC20 token sold on this exchange
function tokenAddress() external view returns (address token);
// Address of Uniswap Factory
function factoryAddress() external view returns (address factory);
// Provide Liquidity
function addLiquidity(uin... | setup | function setup(address token_addr) external;
| // Never use | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2fbf892ee45fad3c43cb433a488866c6524ffc10c3184b2f50896c67b5e94c88 | {
"func_code_index": [
4459,
4508
]
} | 7,048 | ||
ArbitrumValidator | src/v0.8/dev/vendor/arb-bridge-eth/v0.8.0-custom/contracts/bridge/interfaces/IBridge.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | IBridge | interface IBridge {
event MessageDelivered(
uint256 indexed messageIndex,
bytes32 indexed beforeInboxAcc,
address inbox,
uint8 kind,
address sender,
bytes32 messageDataHash
);
function deliverMessageToInbox(
uint8 kind,
address sender,
... | setInbox | function setInbox(address inbox, bool enabled) external;
| // These are only callable by the admin | LineComment | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
601,
661
]
} | 7,049 | |||
ArbitrumValidator | src/v0.8/dev/vendor/arb-bridge-eth/v0.8.0-custom/contracts/bridge/interfaces/IBridge.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | IBridge | interface IBridge {
event MessageDelivered(
uint256 indexed messageIndex,
bytes32 indexed beforeInboxAcc,
address inbox,
uint8 kind,
address sender,
bytes32 messageDataHash
);
function deliverMessageToInbox(
uint8 kind,
address sender,
... | activeOutbox | function activeOutbox() external view returns (address);
| // View functions | LineComment | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
749,
809
]
} | 7,050 | |||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
747,
1374
]
} | 7,051 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
2393,
3159
]
} | 7,052 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
908,
1327
]
} | 7,053 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element f... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
1498,
3047
]
} | 7,054 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
3128,
3262
]
} | 7,055 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
3343,
3457
]
} | 7,056 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
3796,
4005
]
} | 7,057 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
4254,
4402
]
} | 7,058 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
4573,
4727
]
} | 7,059 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
4808,
4971
]
} | 7,060 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
5052,
5174
]
} | 7,061 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
5513,
5667
]
} | 7,062 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
5912,
6048
]
} | 7,063 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
6219,
6361
]
} | 7,064 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
6442,
6593
]
} | 7,065 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
6674,
6793
]
} | 7,066 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
7132,
7274
]
} | 7,067 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
497,
581
]
} | 7,068 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
1139,
1292
]
} | 7,069 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
1442,
1691
]
} | 7,070 |
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | add | function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(PoolInfo({
... | // Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
3337,
3857
]
} | 7,071 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | set | function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
| // Update the given pool's token allocation point. Can only be called by the owner. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
3949,
4258
]
} | 7,072 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | pendingTokens | function pendingTokens(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accTokensPerShare = pool.accTokensPerShare;
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (block.nu... | // View function to see pending tokens on frontend. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
4318,
4997
]
} | 7,073 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward vairables for all pools. Be careful of gas spending! | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
5075,
5260
]
} | 7,074 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | updatePool | function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.number <= pool.lastRewardBlock || block.number >= stakingEndBlock) {
return;
}
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (lpSupply == 0) {
pool.lastRewardBlock = blo... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
5331,
6073
]
} | 7,075 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | deposit | function deposit(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending = user.amount.mul(pool.accTokensPerShare).div(1e12).sub(user.rewardDebt);
sa... | // Deposit LP tokens to contract for token allocation. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
6136,
6873
]
} | 7,076 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | withdraw | function withdraw(uint256 _pid, uint256 _amount) public {
uint256 blocksSinceDeposit = block.number - latestDepositBlockNumberForWallet[msg.sender];
if(blocksSinceDeposit < maturationPeriod) {
revert();
}
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][ms... | // Withdraw LP tokens from contract. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
6918,
7767
]
} | 7,077 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
pool.lpToken.safeTransfer(address(msg.sender), user.amount);
emit EmergencyWithdraw(msg.sender, _pid, user.amount);
user.amount = 0;
user.rewardDebt... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
7833,
8194
]
} | 7,078 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | safeTokenTransfer | function safeTokenTransfer(address _to, uint256 _amount) internal {
uint256 tokenBalance = token.balanceOf(address(this));
if (_amount > tokenBalance) {
token.transfer(_to, tokenBalance);
} else {
token.transfer(_to, _amount);
}
}
| // Safe token transfer function, just in case a rounding error causes pool to not have enough tokens. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
8304,
8606
]
} | 7,079 | ||
YFVIIFarm | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0xd188c909053b61b7a96670333ee2693286c17062 | Solidity | YFVIIFarm | contract YFVIIFarm is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We d... | dev | function dev(address _devaddr) public {
require(msg.sender == devaddr, "dev: wut?");
devaddr = _devaddr;
}
| // Update dev address by the previous dev. | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://9356f47cbdf36426ec9397785966a7554d9f5a2c8702329741c5cede78a0dbe5 | {
"func_code_index": [
8657,
8791
]
} | 7,080 | ||
DOGGToken | DOGGToken.sol | 0x559efe1d7a54fb1c7f25a036952f8498cdf02edb | Solidity | Context | contract Context {
constructor () { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns (address) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.8.4+commit.c7e474f2 | MIT | ipfs://a3356eddaedfab0ba8fc0ff409edfc050a873da2f629fae22ed25a6fce2b788a | {
"func_code_index": [
100,
195
]
} | 7,081 | ||
DOGGToken | DOGGToken.sol | 0x559efe1d7a54fb1c7f25a036952f8498cdf02edb | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://a3356eddaedfab0ba8fc0ff409edfc050a873da2f629fae22ed25a6fce2b788a | {
"func_code_index": [
497,
581
]
} | 7,082 | ||
WinmaxChain | WinmaxChain.sol | 0x8477d79a80245226b71d3151ad58a1fd2b9a3fb5 | Solidity | WinmaxChain | contract WinmaxChain{
/* Public variables of the token */
string public standard = 'WinmaxChain 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public adminAddress;
/* This creates an array with all balances . */
m... | WinmaxChain | function WinmaxChain() {
balanceOf[msg.sender] = 15000000 * 1000000000000000000; // Give the creator all initial tokens
totalSupply = 15000000 * 1000000000000000000; // Update total supply
name = "WinmaxChain"; // Set the name for di... | /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.16+commit.d7661dd9 | None | bzzr://bfaedd06685e40322904aabbb8e6c11a5cb2919ad600f43a65f875cda899dbc9 | {
"func_code_index": [
907,
1488
]
} | 7,083 | ||
WinmaxChain | WinmaxChain.sol | 0x8477d79a80245226b71d3151ad58a1fd2b9a3fb5 | Solidity | WinmaxChain | contract WinmaxChain{
/* Public variables of the token */
string public standard = 'WinmaxChain 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public adminAddress;
/* This creates an array with all balances . */
m... | transfer | function transfer(address _to, uint256 _value) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check... | /* Send coins */ | Comment | v0.4.16+commit.d7661dd9 | None | bzzr://bfaedd06685e40322904aabbb8e6c11a5cb2919ad600f43a65f875cda899dbc9 | {
"func_code_index": [
1513,
2175
]
} | 7,084 | ||
WinmaxChain | WinmaxChain.sol | 0x8477d79a80245226b71d3151ad58a1fd2b9a3fb5 | Solidity | WinmaxChain | contract WinmaxChain{
/* Public variables of the token */
string public standard = 'WinmaxChain 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public adminAddress;
/* This creates an array with all balances . */
m... | approve | function approve(address _spender, uint256 _value)
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /* Allow another contract to spend some tokens in your behalf */ | Comment | v0.4.16+commit.d7661dd9 | None | bzzr://bfaedd06685e40322904aabbb8e6c11a5cb2919ad600f43a65f875cda899dbc9 | {
"func_code_index": [
2248,
2417
]
} | 7,085 | ||
WinmaxChain | WinmaxChain.sol | 0x8477d79a80245226b71d3151ad58a1fd2b9a3fb5 | Solidity | WinmaxChain | contract WinmaxChain{
/* Public variables of the token */
string public standard = 'WinmaxChain 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public adminAddress;
/* This creates an array with all balances . */
m... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /* Approve and then communicate the approved contract in a single tx */ | Comment | v0.4.16+commit.d7661dd9 | None | bzzr://bfaedd06685e40322904aabbb8e6c11a5cb2919ad600f43a65f875cda899dbc9 | {
"func_code_index": [
2497,
2833
]
} | 7,086 | ||
WinmaxChain | WinmaxChain.sol | 0x8477d79a80245226b71d3151ad58a1fd2b9a3fb5 | Solidity | WinmaxChain | contract WinmaxChain{
/* Public variables of the token */
string public standard = 'WinmaxChain 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public adminAddress;
/* This creates an array with all balances . */
m... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
if (balanceOf[_from] < _value) throw; // Check if the sender has enough
if (balanceOf[_to... | /* A contract attempts to get the coins */ | Comment | v0.4.16+commit.d7661dd9 | None | bzzr://bfaedd06685e40322904aabbb8e6c11a5cb2919ad600f43a65f875cda899dbc9 | {
"func_code_index": [
2884,
3666
]
} | 7,087 | ||
BondingVault | contracts/CommunityToken.sol | 0x8f540e6d91ce3296824a4e469ff5f01abf5d700c | Solidity | CommunityToken | contract CommunityToken is ERC20Mintable, ERC20Detailed {
constructor (string memory name, string memory symbol) ERC20Detailed(name, symbol, 18) public {
}
/**
* @dev Function that burns an amount of the token of a given
* account, and DOES NOT require holder's approval
* @param fro... | /**
* @title CommunityToken
* @dev Standard ERC20, but with disabled 'transfer' function to prevent Sybil attack
* Owner (or a 'minter') is a community contract, and it has some extra privileges,
* like burning tokens for a given holder
*/ | NatSpecMultiLine | burnFrom | function burnFrom(address from, uint256 value) public onlyMinter {
_burn(from, value);
}
| /**
* @dev Function that burns an amount of the token of a given
* account, and DOES NOT require holder's approval
* @param from The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | None | bzzr://bf639f6bbcc8e97f4643fda25bf8b031922ec55ccc27074e351e5c96b256ea1f | {
"func_code_index": [
424,
531
]
} | 7,088 |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | typeAndVersion | function typeAndVersion()
external
pure
virtual
override
returns (
string memory
)
{
return "Flags 1.1.0";
}
| /**
* @notice versions:
*
* - Flags 1.1.0: upgraded to solc 0.8, added lowering access controller
* - Flags 1.0.0: initial release
*
* @inheritdoc TypeAndVersionInterface
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
1073,
1221
]
} | 7,089 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | getFlag | function getFlag(
address subject
)
external
view
override
checkAccess()
returns (bool)
{
return flags[subject];
}
| /**
* @notice read the warning flag status of a contract address.
* @param subject The contract address being checked for a flag.
* @return A true value indicates that a flag was raised and a
* false value indicates that no flag was raised.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
1484,
1634
]
} | 7,090 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | getFlags | function getFlags(
address[] calldata subjects
)
external
view
override
checkAccess()
returns (bool[] memory)
{
bool[] memory responses = new bool[](subjects.length);
for (uint256 i = 0; i < subjects.length; i++) {
responses[i] = flags[subjects[i]];
}
return responses;
}
| /**
* @notice read the warning flag status of a contract address.
* @param subjects An array of addresses being checked for a flag.
* @return An array of bools where a true value for any flag indicates that
* a flag was raised and a false value indicates that no flag was raised.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
1936,
2261
]
} | 7,091 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | raiseFlag | function raiseFlag(
address subject
)
external
override
{
require(_allowedToRaiseFlags(), "Not allowed to raise flags");
_tryToRaiseFlag(subject);
}
| /**
* @notice enable the warning flag for an address.
* Access is controlled by raisingAccessController, except for owner
* who always has access.
* @param subject The contract address whose flag is being raised
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
2495,
2672
]
} | 7,092 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | raiseFlags | function raiseFlags(
address[] calldata subjects
)
external
override
{
require(_allowedToRaiseFlags(), "Not allowed to raise flags");
for (uint256 i = 0; i < subjects.length; i++) {
_tryToRaiseFlag(subjects[i]);
}
}
| /**
* @notice enable the warning flags for multiple addresses.
* Access is controlled by raisingAccessController, except for owner
* who always has access.
* @param subjects List of the contract addresses whose flag is being raised
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
2926,
3180
]
} | 7,093 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | lowerFlag | function lowerFlag(
address subject
)
external
override
{
require(_allowedToLowerFlags(), "Not allowed to lower flags");
_tryToLowerFlag(subject);
}
| /**
* @notice allows owner to disable the warning flags for an addresses.
* Access is controlled by loweringAccessController, except for owner
* who always has access.
* @param subject The contract address whose flag is being lowered
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
3436,
3613
]
} | 7,094 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | lowerFlags | function lowerFlags(
address[] calldata subjects
)
external
override
{
require(_allowedToLowerFlags(), "Not allowed to lower flags");
for (uint256 i = 0; i < subjects.length; i++) {
address subject = subjects[i];
_tryToLowerFlag(subject);
}
}
| /**
* @notice allows owner to disable the warning flags for multiple addresses.
* Access is controlled by loweringAccessController, except for owner
* who always has access.
* @param subjects List of the contract addresses whose flag is being lowered
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
3886,
4174
]
} | 7,095 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | setRaisingAccessController | function setRaisingAccessController(
address racAddress
)
public
override
onlyOwner()
{
address previous = address(raisingAccessController);
if (previous != racAddress) {
raisingAccessController = AccessControllerInterface(racAddress);
emit RaisingAccessControllerUpdated(previous, racAddress);
}... | /**
* @notice allows owner to change the access controller for raising flags.
* @param racAddress new address for the raising access controller.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
4335,
4683
]
} | 7,096 | |
ArbitrumValidator | src/v0.8/dev/Flags.sol | 0x29cd92f343f9d81e74fae28913b038a81005b46f | Solidity | Flags | contract Flags is TypeAndVersionInterface, FlagsInterface, SimpleReadAccessController {
AccessControllerInterface public raisingAccessController;
AccessControllerInterface public loweringAccessController;
mapping(address => bool) private flags;
event FlagRaised(
address indexed subject
);
event FlagL... | /**
* @title The Flags contract
* @notice Allows flags to signal to any reader on the access control list.
* The owner can set flags, or designate other addresses to set flags.
* Raise flag actions are controlled by its own access controller.
* Lower flag actions are controlled by its own access controller.
* An ... | NatSpecMultiLine | _allowedToRaiseFlags | function _allowedToRaiseFlags()
private
view
returns (bool)
{
return msg.sender == owner() ||
raisingAccessController.hasAccess(msg.sender, msg.data);
}
| // PRIVATE | LineComment | v0.8.6+commit.11564f7e | MIT | {
"func_code_index": [
5053,
5233
]
} | 7,097 | |
TxDaoCrowdsale | contracts/TxDaoCrowdsale.sol | 0x699c9b664f5196b02dcf20a27c035749c6889ffb | Solidity | TxDaoCrowdsale | contract TxDaoCrowdsale is ERC721, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
string _defaultBaseURI = "https://metadata.txdao.org/";
bool public _saleIsActive = true;
address[] public _signers;
uint256[] public _usedVouche... | contractURI | function contractURI() public view returns (string memory) {
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, "contract")) : "";
}
| // Contract level metadata | LineComment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2312,
2521
]
} | 7,098 | ||||
AkulaInu | openzeppelin-solidity\contracts\utils\Address.sol | 0x4f8ed47f839e079be0a79b95d0fd5473c90804d0 | 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.2+commit.bacdbe57 | None | ipfs://36acfd850d1a2fda2fc855c17ea6964ae99204c9d3a51b35ba8958489722da1b | {
"func_code_index": [
606,
1230
]
} | 7,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.