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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Pausable | contract Pausable is PauserRole {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
_paused = false;
}
/**
* @return true if the contract is paused, false otherwise.
*/
function paused() public vi... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | paused | function paused() public view returns (bool) {
return _paused;
}
| /**
* @return true if the contract is paused, false otherwise.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
289,
372
]
} | 13,000 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Pausable | contract Pausable is PauserRole {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
_paused = false;
}
/**
* @return true if the contract is paused, false otherwise.
*/
function paused() public vi... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | pause | function pause() public onlyPauser whenNotPaused {
_paused = true;
emit Paused(msg.sender);
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
825,
946
]
} | 13,001 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Pausable | contract Pausable is PauserRole {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
_paused = false;
}
/**
* @return true if the contract is paused, false otherwise.
*/
function paused() public vi... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | unpause | function unpause() public onlyPauser whenPaused {
_paused = false;
emit Unpaused(msg.sender);
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
1036,
1159
]
} | 13,002 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
_owner = m... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @return the address of the owner.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
457,
541
]
} | 13,003 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
_owner = m... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | isOwner | function isOwner() public view returns (bool) {
return msg.sender == _owner;
}
| /**
* @return true if `msg.sender` is the owner of the contract.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
792,
889
]
} | 13,004 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
_owner = m... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.... | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
1247,
1392
]
} | 13,005 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
_owner = m... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
1564,
1678
]
} | 13,006 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
_owner = m... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal {
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
1823,
2015
]
} | 13,007 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | ERC20Destroyable | contract ERC20Destroyable is ERC20, DestroyerRole {
/**
* @dev Function to mint tokens
* @param from The address that will have the tokens destroyed.
* @param value The amount of tokens to destroy.
* @return A boolean that indicates if the operation was successful.
*/
function de... | /**
* @title ERC20Destroyable
* @dev ERC20 destroying logic
*/ | NatSpecMultiLine | destroy | function destroy(address from, uint256 value) public onlyDestroyer returns (bool) {
_burn(from, value);
return true;
}
| /**
* @dev Function to mint tokens
* @param from The address that will have the tokens destroyed.
* @param value The amount of tokens to destroy.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
305,
451
]
} | 13,008 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | entryCreditContract | function entryCreditContract() public view returns (address) {
return _entryCreditContract;
}
| // Returns _entryCreditContract | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
2163,
2275
]
} | 13,009 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | setEntryCreditContract | function setEntryCreditContract(address contractAddress) public onlyOwner {
emit EntryCreditContractChanged(_entryCreditContract, contractAddress);
_entryCreditContract = contractAddress;
}
| // Set _entryCreditContract | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
2311,
2528
]
} | 13,010 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | balanceSheetContract | function balanceSheetContract() public view returns (address) {
return _balanceSheetContract;
}
| // Returns _balanceSheetContract | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
2569,
2683
]
} | 13,011 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | setBalanceSheetContract | function setBalanceSheetContract(address contractAddress) public onlyOwner {
emit BalanceSheetContractChanged(_balanceSheetContract, contractAddress);
_balanceSheetContract = contractAddress;
}
| // Set _balanceSheetContract | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
2720,
2941
]
} | 13,012 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | bmeMintBatchSize | function bmeMintBatchSize() public view returns (uint256) {
return _bmeMintBatchSize;
}
| // Returns _bmeMintBatchSize | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
2978,
3084
]
} | 13,013 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | setBmeMintBatchSize | function setBmeMintBatchSize(uint256 batchSize) public onlyMinter {
emit BmeMintBatchSizeChanged(_bmeMintBatchSize, batchSize);
_bmeMintBatchSize = batchSize;
}
| // Set _bmeMintBatchSize | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
3117,
3305
]
} | 13,014 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | bmeClaimBatchSize | function bmeClaimBatchSize() public view returns (uint256) {
return _bmeClaimBatchSize;
}
| // Returns _bmeClaimBatchSize | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
3343,
3451
]
} | 13,015 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | setBmeClaimBatchSize | function setBmeClaimBatchSize(uint256 batchSize) public onlyMinter {
emit BmeClaimBatchSizeChanged(_bmeClaimBatchSize, batchSize);
_bmeClaimBatchSize = batchSize;
}
| // Set _bmeClaimBatchSize | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
3485,
3677
]
} | 13,016 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | _transfer | function _transfer(address from, address to, uint256 value) internal {
if (to == _entryCreditContract) {
_burn(from, value);
IEntryCreditContract entryCreditContractInstance = IEntryCreditContract(to);
require(entryCreditContractInstance.mint(from, value), "Failed to mint entry credi... | // Overwrites ERC20._transfer.
// If to = _entryCreditContract, sends tokens to the credit contract according to the
// exchange rate in credit contract, destroys tokens locally | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
3873,
4540
]
} | 13,017 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | destroy | function destroy(address from, uint256 value)
public whenPaused whenNotInBME
returns (bool)
{
return super.destroy(from, value);
}
| // Call ERC20._burn(from, value) | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
4581,
4753
]
} | 13,018 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | batchDestroy | function batchDestroy(address[] calldata from, uint256[] calldata values)
external onlyDestroyer whenPaused whenNotInBME
returns (bool)
{
uint fromLength = from.length;
require(fromLength == values.length, "Input arrays must have the same length");
for (uint256 i = 0; i < fromLength; i++) ... | // Run destroy for all entries | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
4792,
5224
]
} | 13,019 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | mint | function mint(address to, uint256 value)
public whenPaused whenNotInBME
returns (bool)
{
return super.mint(to, value);
}
| // Call ERC20._mint(to, value) | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
5263,
5425
]
} | 13,020 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | batchMint | function batchMint(address[] calldata to, uint256[] calldata values)
external onlyMinter whenPaused whenNotInBME
returns (bool)
{
_batchMint(to, values);
return true;
}
| // Run mint for all entries | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
5461,
5682
]
} | 13,021 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | bmeMint | function bmeMint()
public onlyMinter whenInBME whenNotPaused
{
IBalanceSheetContract balanceSheetContractInstance = IBalanceSheetContract(_balanceSheetContract);
(address[] memory receivers, uint256[] memory amounts) = balanceSheetContractInstance.popMintingInformation(_bmeMintBatchSize);
_batchM... | // Uses the balance sheet in _balanceSheetContract as a basis for
// batchMint call for _bmeMintBatchSize addresses | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
5811,
6305
]
} | 13,022 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | _claimFor | function _claimFor(address[] memory claimers)
private
{
IBalanceSheetContract balanceSheetContractInstance = IBalanceSheetContract(_balanceSheetContract);
uint256[] memory amounts = balanceSheetContractInstance.popClaimingInformation(claimers);
_batchMint(claimers, amounts);
require(balanc... | // Uses the balance sheet in _balanceSheetContract to create
// tokens for all addresses in for, limits to _bmeMintBatchSize, emit Transfer | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
6458,
6906
]
} | 13,023 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | claim | function claim()
public whenInBME whenNotPaused
{
address[] memory claimers = new address[](1);
claimers[0] = msg.sender;
_claimFor(claimers);
}
| // Calls _claimFor with for = msg.sender | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
7347,
7542
]
} | 13,024 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | claimFor | function claimFor(address[] calldata claimers)
external whenInBME whenNotPaused
{
require(claimers.length <= _bmeClaimBatchSize, "Input array must be shorter than bme claim batch size.");
_claimFor(claimers);
}
| // Calls _claimFor with for as provided | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
7590,
7842
]
} | 13,025 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | PrzToken | contract PrzToken is ERC20Detailed, ERC20Mintable, ERC20Destroyable, ERC20Pausable, Ownable {
// Stores the address of the entry credit contract
address private _entryCreditContract;
// Stores the address of contract with burned tokens (basis for BME minting)
address private _balanceSheetContrac... | changePhaseToBME | function changePhaseToBME()
public onlyOwner whenNotPaused whenNotInBME
{
_isInBmePhase = true;
emit PhaseChangedToBME(msg.sender);
}
| // Change possible when in initPhase | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
7887,
8062
]
} | 13,026 | |||
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | IBalanceSheetContract | interface IBalanceSheetContract {
function setPeerzTokenSupply(uint256 przTotalSupply) external returns (bool);
// NOTE the returned arrays need to have exactly the same length
function popMintingInformation(uint256 bmeMintBatchSize) external returns (address[] memory, uint256[] memory);
// NO... | // NOTE the following interface imposes the minimum technically feasible
// NOTE constraints on information that is to be exchanged between the
// NOTE Peerz token contract and the balance sheet contract
// NOTE in other words, in our opinion this interface is the one with the
// NOTE highest probability of allowing fo... | LineComment | popMintingInformation | function popMintingInformation(uint256 bmeMintBatchSize) external returns (address[] memory, uint256[] memory);
| // NOTE the returned arrays need to have exactly the same length | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
192,
308
]
} | 13,027 | |
PrzToken | PrzToken.sol | 0x1acca663cf7e865eed61caeedc36dc0f7ab05baa | Solidity | IBalanceSheetContract | interface IBalanceSheetContract {
function setPeerzTokenSupply(uint256 przTotalSupply) external returns (bool);
// NOTE the returned arrays need to have exactly the same length
function popMintingInformation(uint256 bmeMintBatchSize) external returns (address[] memory, uint256[] memory);
// NO... | // NOTE the following interface imposes the minimum technically feasible
// NOTE constraints on information that is to be exchanged between the
// NOTE Peerz token contract and the balance sheet contract
// NOTE in other words, in our opinion this interface is the one with the
// NOTE highest probability of allowing fo... | LineComment | popClaimingInformation | function popClaimingInformation(address[] calldata claimers) external returns (uint256[] memory);
| // NOTE the returned array needs to have exactly the same length as the claimers array | LineComment | v0.5.2+commit.1df8f40c | bzzr://5d78c379a6bf749e648e225620a35e0a77cfd34d24e7b678a68f8c19d3733e8c | {
"func_code_index": [
403,
505
]
} | 13,028 | |
UBIQCOIN | UBIQCOIN.sol | 0xb12a5054c2bb31300b27735241c1fd0f22201ef3 | Solidity | UBIQCOIN | contract UBIQCOIN {
struct Event {
address event_address;
uint8 max_member;
uint8 member_count;
}
//Basic Token Info
uint256 public constant totalSupply=1000000000000000000000000000;
string public constant name = "UBIQCOIN";
string public constant symbol = "U... | create_event | function create_event(uint8 _max_member, address _event_address, uint256 _pos) public onlyOwner {
Events[_pos].event_address = _event_address;
Events[_pos].max_member = _max_member;
Events[_pos].member_count = 0;
}
| //Event creation only by contract owner (see modifier) | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://a703f5625332fba5a319d587bd2c3dc8457a4b5a43424ff7aa917e7ecad1f225 | {
"func_code_index": [
3315,
3566
]
} | 13,029 | ||
UBIQCOIN | UBIQCOIN.sol | 0xb12a5054c2bb31300b27735241c1fd0f22201ef3 | Solidity | UBIQCOIN | contract UBIQCOIN {
struct Event {
address event_address;
uint8 max_member;
uint8 member_count;
}
//Basic Token Info
uint256 public constant totalSupply=1000000000000000000000000000;
string public constant name = "UBIQCOIN";
string public constant symbol = "U... | set_coin_address | function set_coin_address(address _coin_address) public onlyOwner {
coin_address = _coin_address;
}
| //Coin address setting only by contract owner (see modifier) | LineComment | v0.5.8+commit.23d335f2 | None | bzzr://a703f5625332fba5a319d587bd2c3dc8457a4b5a43424ff7aa917e7ecad1f225 | {
"func_code_index": [
3635,
3753
]
} | 13,030 | ||
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address) external;
| /**
修改OWNER
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3231,
3281
]
} | 13,031 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setYou | function setYou(ITokenYou) external;
| /**
设置YOU
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3313,
3354
]
} | 13,032 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setInvite | function setInvite(YouswapInviteV1) external;
| /**
设置邀请关系
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3387,
3437
]
} | 13,033 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | deposit | function deposit(uint256, uint256) external;
| /**
质押
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3469,
3518
]
} | 13,034 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | withdraw | function withdraw(uint256, uint256) external;
| /**
解质押、提取奖励
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3557,
3607
]
} | 13,035 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | poolPledgeAddresss | function poolPledgeAddresss(uint256) external view returns (address[] memory);
| /**
矿池质押地址
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3640,
3723
]
} | 13,036 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | powerScale | function powerScale(uint256, address) external view returns (uint256);
| /**
算力占比
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3754,
3829
]
} | 13,037 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | pendingReward | function pendingReward(uint256, address) external view returns (uint256);
| /**
待领取的奖励
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3862,
3940
]
} | 13,038 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | rewardContribute | function rewardContribute(address, address) external view returns (uint256);
| /**
下级收益贡献
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
3973,
4054
]
} | 13,039 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | selfReward | function selfReward(address) external view returns (uint256);
| /**
个人收益加成
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4087,
4153
]
} | 13,040 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | poolNumbers | function poolNumbers(address) external view returns (uint256[] memory);
| /**
通过lp查询矿池编号
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4190,
4266
]
} | 13,041 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setOperateOwner | function setOperateOwner(address, bool) external;
| /**
设置运营权限
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4299,
4353
]
} | 13,042 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | addPool | function addPool(string memory, address, uint256, uint256) external returns (bool);
| /**
新建矿池
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4484,
4572
]
} | 13,043 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setRewardPerBlock | function setRewardPerBlock(uint256, uint256) external;
| /**
修改矿池区块奖励
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4615,
4674
]
} | 13,044 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setRewardTotal | function setRewardTotal(uint256, uint256) external;
| /**
修改矿池总奖励
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4708,
4764
]
} | 13,045 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setName | function setName(uint256, string memory) external;
| /**
修改矿池名称
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4797,
4852
]
} | 13,046 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setMultiple | function setMultiple(uint256, uint256) external;
| /**
修改矿池倍数
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4889,
4942
]
} | 13,047 |
YouswapFactoryV1 | localhost/contract/interface/IYouswapFactoryV1.sol | 0x043659e4db135d2b46b41a611ab67eb4d5979ae6 | Solidity | IYouswapFactoryV1 | interface IYouswapFactoryV1 {
/**
用户挖矿信息
*/
struct RewardInfo {
uint256 receiveReward;//总领取奖励
uint256 inviteReward;//总邀请奖励
uint256 pledgeReward;//总质押奖励
}
/**
质押用户信息
*/
struct UserInfo {
uint256 startBlock;//质押开始块高
uint25... | /**
挖矿
*/ | NatSpecMultiLine | setPriority | function setPriority(uint256, uint256) external;
| /**
修改矿池排序
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://2e342468e031bb1672c69f3b0dc0caab8df1e9b11f505524c594adcaf427759b | {
"func_code_index": [
4979,
5032
]
} | 13,048 |
Petrichor | Petrichor.sol | 0x2b300eb6be34d131b659e601cd0058a2c8ed0963 | Solidity | Petrichor | contract Petrichor is ERC20, ERC20Snapshot, Ownable {
constructor() ERC20("Petrichor", "IXWP") {
_mint(msg.sender, 359000000 * 10 ** decimals());
}
function snapshot() public onlyOwner {
_snapshot();
}
// The following functions are overrides required by Solidity.
f... | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
override(ERC20, ERC20Snapshot)
{
super._beforeTokenTransfer(from, to, amount);
}
| // The following functions are overrides required by Solidity. | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://f3c2c98ed0139818a4fe7198a60b7e17ce40f71185bf0c198b55367d01b1f5b0 | {
"func_code_index": [
315,
518
]
} | 13,049 | ||
SMASH | SMASH.sol | 0x4cc0f85a9eb0d41cf5fbbff2e1d96ca79f0de93e | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
function div(uint256 a, u... | // t.me/SmashFinance | LineComment | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
| /**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.6.0+commit.26b70077 | None | ipfs://0d3a3f96c2ddd316bc01309de2890e0d425e30bd666643a56ba8cab7eed49f5d | {
"func_code_index": [
98,
288
]
} | 13,050 |
OUNCE | OUNCE.sol | 0x3b83e9c4ad682ee848d9f2859756f127f912a618 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title FIRST OUNCE Project
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://9f77d67ae11cc3dccc802346a530435952e7db925cad93646575db624492b5c1 | {
"func_code_index": [
95,
302
]
} | 13,051 | |
OUNCE | OUNCE.sol | 0x3b83e9c4ad682ee848d9f2859756f127f912a618 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title FIRST OUNCE Project
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://9f77d67ae11cc3dccc802346a530435952e7db925cad93646575db624492b5c1 | {
"func_code_index": [
392,
692
]
} | 13,052 | |
OUNCE | OUNCE.sol | 0x3b83e9c4ad682ee848d9f2859756f127f912a618 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title FIRST OUNCE Project
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://9f77d67ae11cc3dccc802346a530435952e7db925cad93646575db624492b5c1 | {
"func_code_index": [
812,
940
]
} | 13,053 | |
OUNCE | OUNCE.sol | 0x3b83e9c4ad682ee848d9f2859756f127f912a618 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title FIRST OUNCE Project
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://9f77d67ae11cc3dccc802346a530435952e7db925cad93646575db624492b5c1 | {
"func_code_index": [
1010,
1156
]
} | 13,054 | |
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | updateVerifier | function updateVerifier(uint feeRate, uint baseFee) external {
require(feeRate >= 0 && feeRate <= ((10 ** feeRateDecimals) * 100));
require(baseFee >= 0 && baseFee <= 100000000 * 1 ether);
Verifier storage verifier = verifiers[msg.sender];
uint oldFeeRate = verifier.feeRate;
uint oldBaseFee... | /// Update verifier's data | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
3588,
4162
]
} | 13,055 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | makeBet | function makeBet(uint makerBetId, uint odds, address trustedVerifier, uint trustedVerifierFeeRate, uint trustedVerifierBaseFee, uint expiry) external payable {
require(odds > (10 ** oddsDecimals) && odds < ((10 ** 8) * (10 ** oddsDecimals)));
require(expiry > now);
MakerBet storage makerBet = makerBets... | /// Make a bet | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
4185,
5461
]
} | 13,056 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | addFund | function addFund(uint makerBetId) external payable {
MakerBet storage makerBet = makerBets[makerBetId][msg.sender];
require(makerBet.makerBetId != 0);
require(now < makerBet.expiry);
require(makerBet.status == BetStatus.Open || makerBet.status == BetStatus.Paused);
require(msg.sender == m... | /// Increase total fund of a bet | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
5502,
6109
]
} | 13,057 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | updateOdds | function updateOdds(uint makerBetId, uint odds) external {
require(odds > (10 ** oddsDecimals) && odds < ((10 ** 8) * (10 ** oddsDecimals)));
MakerBet storage makerBet = makerBets[makerBetId][msg.sender];
require(makerBet.makerBetId != 0);
require(now < makerBet.expiry);
require(makerBet.... | /// Update odds of a bet | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
6142,
6805
]
} | 13,058 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | pauseBet | function pauseBet(uint makerBetId) external {
MakerBet storage makerBet = makerBets[makerBetId][msg.sender];
require(makerBet.makerBetId != 0);
require(makerBet.status == BetStatus.Open);
require(msg.sender == makerBet.maker);
makerBet.status = BetStatus.Paused;
emit LogPauseBet(ma... | /// Pause a bet | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
6829,
7207
]
} | 13,059 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | reopenBet | function reopenBet(uint makerBetId) external {
MakerBet storage makerBet = makerBets[makerBetId][msg.sender];
require(makerBet.makerBetId != 0);
require(makerBet.status == BetStatus.Paused);
require(msg.sender == makerBet.maker);
makerBet.status = BetStatus.Open;
emit LogReopenBet(... | /// Reopen a bet | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
7232,
7612
]
} | 13,060 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | closeBet | function closeBet(uint makerBetId) external {
MakerBet storage makerBet = makerBets[makerBetId][msg.sender];
require(makerBet.makerBetId != 0);
require(makerBet.status == BetStatus.Open || makerBet.status == BetStatus.Paused);
require(msg.sender == makerBet.maker);
makerBet.status = BetSt... | /// Close a bet and withdraw unused fund | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
7661,
9008
]
} | 13,061 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | takeBet | function takeBet(uint makerBetId, address maker, uint odds, uint takerBetId) external payable {
require(msg.sender != maker);
require(msg.value > 0);
MakerBet storage makerBet = makerBets[makerBetId][maker];
require(makerBet.makerBetId != 0);
require(msg.sender != makerBet.trustedVerifier... | /// Take a bet | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
9031,
10834
]
} | 13,062 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | settleBet | function settleBet(uint makerBetId, address maker, uint outcome) external {
require(outcome == 1 || outcome == 2 || outcome == 3 || outcome == 4);
MakerBet storage makerBet = makerBets[makerBetId][maker];
require(makerBet.makerBetId != 0);
require(msg.sender == makerBet.trustedVerifier.addr);
... | /// Settle a bet by trusted verifier | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
10879,
11581
]
} | 13,063 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | withdraw | function withdraw(uint makerBetId, address maker) external {
MakerBet storage makerBet = makerBets[makerBetId][maker];
require(makerBet.makerBetId != 0);
require(makerBet.outcome != BetOutcome.NotSettled);
require(makerBet.status == BetStatus.Settled);
bool fullyWithdrawn = false;
... | /// Manual withdraw fund from a bet after outcome is set | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
11646,
12395
]
} | 13,064 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | payMaker | function payMaker(MakerBet storage makerBet) private returns (bool fullyWithdrawn) {
fullyWithdrawn = false;
if (!makerBet.makerFundWithdrawn) {
makerBet.makerFundWithdrawn = true;
uint payout = 0;
if (makerBet.outcome == BetOutcome.MakerWin) {
uint trustedVerifierF... | /// Payout to maker | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
12423,
13608
]
} | 13,065 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | payTaker | function payTaker(MakerBet storage makerBet, address taker) private returns (bool fullyWithdrawn) {
fullyWithdrawn = false;
uint payout = 0;
for (uint betIndex = 0; betIndex < makerBet.takerBetsCount; betIndex++) {
if (makerBet.takerBets[betIndex].taker == taker) {
if (!makerBet... | /// Payout to taker | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
13636,
15500
]
} | 13,066 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | payVerifier | function payVerifier(MakerBet storage makerBet) private returns (bool fullyWithdrawn) {
fullyWithdrawn = false;
if (!makerBet.trustedVerifierFeeSent) {
makerBet.trustedVerifierFeeSent = true;
uint payout = 0;
if (makerBet.outcome == BetOutcome.MakerWin) {
uint trust... | /// Payout to verifier | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
15531,
16914
]
} | 13,067 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | getOwner | function getOwner() external view returns(address) {
return owner;
}
| /* External views */ | Comment | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
16943,
17030
]
} | 13,068 | |||
InterbetCore | InterbetCore.sol | 0x0e0a86c97a07856d68bf3387aeb9430dbab93245 | Solidity | InterbetCore | contract InterbetCore {
/* Global constants */
uint constant oddsDecimals = 2; // Max. decimal places of odds
uint constant feeRateDecimals = 1; // Max. decimal places of fee rate
uint public minMakerBetFund = 100 * 1 finney; // Minimum fund of a maker bet
uint public maxAllowedTakerBetsP... | mul | function mul(uint256 _a, uint256 _b) private pure returns(uint256 c) {
if (_a == 0) {
return 0;
}
c = _a * _b;
assert(c / _a == _b);
return c;
}
| /* Math utilities */ | Comment | v0.4.24+commit.e67f0147 | bzzr://d64d87c62fc790ad06cbc7c13386d155faedd1bbbb6e1974d8fc763aedb95090 | {
"func_code_index": [
18830,
19044
]
} | 13,069 | |||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
receive () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementati... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | /**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
114,
170
]
} | 13,070 | ||
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
receive () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementati... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _implementation | function _implementation() virtual internal view returns (address);
| /**
* @return The Address of the implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
296,
366
]
} | 13,071 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
receive () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementati... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _delegate | function _delegate(address implementation) internal {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
... | /**
* @dev Delegates execution to an implementation contract.
* This is a low level function that doesn't return to its internal call site.
* It will return to the external caller whatever the implementation returns.
* @param implementation Address to delegate.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
657,
1422
]
} | 13,072 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
receive () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementati... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _willFallback | function _willFallback() virtual internal {
}
| /**
* @dev Function that is run as the first thing in the fallback function.
* Can be redefined in derived contracts to add functionality.
* Redefinitions must call super._willFallback().
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1635,
1694
]
} | 13,073 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
receive () payable external {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementati... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _fallback | function _fallback() internal {
if(OpenZeppelinUpgradesAddress.isContract(msg.sender) && msg.data.length == 0 && gasleft() <= 2300) // for receive ETH only from other contract
return;
_willFallback();
_delegate(_implementation());
}
| /**
* @dev fallback implementation.
* Extracted to enable manual triggering.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1792,
2062
]
} | 13,074 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseUpgradeabilityProxy | abstract contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
... | /**
* @title BaseUpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _implementation | function _implementation() override internal view returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
| /**
* @dev Returns the current implementation.
* @return impl Address of the current implementation
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
693,
866
]
} | 13,075 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseUpgradeabilityProxy | abstract contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
... | /**
* @title BaseUpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _upgradeTo | function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
| /**
* @dev Upgrades the proxy to a new implementation.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1004,
1152
]
} | 13,076 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseUpgradeabilityProxy | abstract contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
... | /**
* @title BaseUpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _setImplementation | function _setImplementation(address newImplementation) internal {
require(OpenZeppelinUpgradesAddress.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
| /**
* @dev Sets the implementation address of the proxy.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1292,
1608
]
} | 13,077 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | admin | function admin() external ifAdmin returns (address) {
return _admin();
}
| /**
* @return The address of the proxy admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
989,
1072
]
} | 13,078 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | implementation | function implementation() external ifAdmin returns (address) {
return _implementation();
}
| /**
* @return The address of the implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1138,
1239
]
} | 13,079 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | changeAdmin | function changeAdmin(address newAdmin) external ifAdmin {
require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
emit AdminChanged(_admin(), newAdmin);
_setAdmin(newAdmin);
}
| /**
* @dev Changes the admin of the proxy.
* Only the current admin can call this function.
* @param newAdmin Address to transfer proxy administration to.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1419,
1650
]
} | 13,080 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | upgradeTo | function upgradeTo(address newImplementation) external ifAdmin {
_upgradeTo(newImplementation);
}
| /**
* @dev Upgrade the backing implementation of the proxy.
* Only the admin can call this function.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1838,
1946
]
} | 13,081 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | upgradeToAndCall | function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin {
_upgradeTo(newImplementation);
(bool success,) = newImplementation.delegatecall(data);
require(success);
}
| /**
* @dev Upgrade the backing implementation of the proxy and call a function
* on the new implementation.
* This is useful to initialize the proxied contract.
* @param newImplementation Address of the new implementation.
* @param data Data to send as msg.data in the low level call.
* It should include the... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2471,
2699
]
} | 13,082 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | _admin | function _admin() internal view returns (address adm) {
bytes32 slot = ADMIN_SLOT;
assembly {
adm := sload(slot)
}
}
| /**
* @return adm The admin slot.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
2750,
2894
]
} | 13,083 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | _setAdmin | function _setAdmin(address newAdmin) internal {
bytes32 slot = ADMIN_SLOT;
assembly {
sstore(slot, newAdmin)
}
}
| /**
* @dev Sets the address of the proxy admin.
* @param newAdmin Address of the new proxy admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
3013,
3155
]
} | 13,084 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | BaseAdminUpgradeabilityProxy | contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
... | /**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that... | NatSpecMultiLine | _willFallback | function _willFallback() virtual override internal {
require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
//super._willFallback();
}
| /**
* @dev Only fall back when the sender is not the admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
3232,
3414
]
} | 13,085 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | InitializableUpgradeabilityProxy | abstract contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Contract initializer.
* @param _logic Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature a... | /**
* @title InitializableUpgradeabilityProxy
* @dev Extends BaseUpgradeabilityProxy with an initializer for initializing
* implementation and init data.
*/ | NatSpecMultiLine | initialize | function initialize(address _logic, bytes memory _data) public payable {
require(_implementation() == address(0));
assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));
_setImplementation(_logic);
if(_data.length > 0) {
(bool success,) = _logic.delegatecall(_da... | /**
* @dev Contract initializer.
* @param _logic Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be called, as described in
* https://solidity.readth... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
611,
987
]
} | 13,086 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | InitializableAdminUpgradeabilityProxy | contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy {
/**
* Contract initializer.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the impl... | /**
* @title InitializableAdminUpgradeabilityProxy
* @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for
* initializing the implementation, admin, and init data.
*/ | NatSpecMultiLine | initialize | function initialize(address _admin, address _logic, bytes memory _data) public payable {
require(_implementation() == address(0));
InitializableUpgradeabilityProxy.initialize(_logic, _data);
assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));
_setAdmin(_admin);
}
| /**
* Contract initializer.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be ca... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
697,
1012
]
} | 13,087 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ProductProxy | contract ProductProxy is Proxy {
/**
* @dev Storage slot with the address of the ProxyFactory.
* This is the keccak-256 hash of "eip1967.proxy.factory" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant FACTORY_SLOT = 0x7a45a402e4cb6e08ebc196f20f66d5d30e6728... | /**
* @title ProductProxy
* @dev This contract implements a proxy that
* it is deploied by ProxyFactory,
* and it's implementation is stored in factory.
*/ | NatSpecMultiLine | _name | function _name() virtual internal view returns (bytes32 name_) {
bytes32 slot = NAME_SLOT;
assembly { name_ := sload(slot) }
}
| // bytes32(uint256(keccak256('eip1967.proxy.name')) - 1) | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
525,
669
]
} | 13,088 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ProductProxy | contract ProductProxy is Proxy {
/**
* @dev Storage slot with the address of the ProxyFactory.
* This is the keccak-256 hash of "eip1967.proxy.factory" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant FACTORY_SLOT = 0x7a45a402e4cb6e08ebc196f20f66d5d30e6728... | /**
* @title ProductProxy
* @dev This contract implements a proxy that
* it is deploied by ProxyFactory,
* and it's implementation is stored in factory.
*/ | NatSpecMultiLine | _setFactory | function _setFactory(address newFactory) internal {
require(OpenZeppelinUpgradesAddress.isContract(newFactory), "Cannot set a factory to a non-contract address");
bytes32 slot = FACTORY_SLOT;
assembly {
sstore(slot, newFactory)
}
}
| /**
* @dev Sets the factory address of the ProductProxy.
* @param newFactory Address of the new factory.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
922,
1190
]
} | 13,089 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ProductProxy | contract ProductProxy is Proxy {
/**
* @dev Storage slot with the address of the ProxyFactory.
* This is the keccak-256 hash of "eip1967.proxy.factory" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant FACTORY_SLOT = 0x7a45a402e4cb6e08ebc196f20f66d5d30e6728... | /**
* @title ProductProxy
* @dev This contract implements a proxy that
* it is deploied by ProxyFactory,
* and it's implementation is stored in factory.
*/ | NatSpecMultiLine | _factory | function _factory() internal view returns (address factory_) {
bytes32 slot = FACTORY_SLOT;
assembly {
factory_ := sload(slot)
}
}
| /**
* @dev Returns the factory.
* @return factory_ Address of the factory.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1286,
1444
]
} | 13,090 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ProductProxy | contract ProductProxy is Proxy {
/**
* @dev Storage slot with the address of the ProxyFactory.
* This is the keccak-256 hash of "eip1967.proxy.factory" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant FACTORY_SLOT = 0x7a45a402e4cb6e08ebc196f20f66d5d30e6728... | /**
* @title ProductProxy
* @dev This contract implements a proxy that
* it is deploied by ProxyFactory,
* and it's implementation is stored in factory.
*/ | NatSpecMultiLine | _implementation | function _implementation() virtual override internal view returns (address) {
address factory_ = _factory();
if(OpenZeppelinUpgradesAddress.isContract(factory_))
return IProxyFactory(factory_).productImplementations(_name());
else
return address(0);
}
| /**
* @dev Returns the current implementation.
* @return Address of the current implementation
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
1562,
1852
]
} | 13,091 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | InitializableProductProxy | contract InitializableProductProxy is ProductProxy {
/**
* @dev Contract initializer.
* @param factory_ Address of the initial factory.
* @param data_ Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the functio... | /**
* @title InitializableProductProxy
* @dev Extends ProductProxy with an initializer for initializing
* factory and init data.
*/ | NatSpecMultiLine | __InitializableProductProxy_init | function __InitializableProductProxy_init(address factory_, bytes32 name_, bytes memory data_) public payable {
require(_factory() == address(0));
assert(FACTORY_SLOT == bytes32(uint256(keccak256('eip1967.proxy.factory')) - 1));
assert(NAME_SLOT == bytes32(uint256(keccak256('eip1967.proxy.name')) - 1));
... | /**
* @dev Contract initializer.
* @param factory_ Address of the initial factory.
* @param data_ Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be called, as described in
* https://solidity.readthedocs... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
579,
1085
]
} | 13,092 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Initializable | contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private initializing;
/**
* @dev Modifier to use in the initializer function ... | /**
* @title Initializable
*
* @dev Helper contract to support initializer functions. To use it, replace
* the constructor with a function that has the `initializer` modifier.
* WARNING: Unlike constructors, initializer functions must be manually
* invoked. This applies both to deploying an Initializable co... | NatSpecMultiLine | isConstructor | function isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way t... | /// @dev Returns true if and only if the function is running in the constructor | NatSpecSingleLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
782,
1293
]
} | 13,093 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | ContextUpgradeSafe | contract ContextUpgradeSafe is Initializable {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
function __Context_init() internal initializer {
__Context_init_unchained();
}
function _... | /*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending ... | Comment | __Context_init | function __Context_init() internal initializer {
__Context_init_unchained();
}
| // Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
206,
303
]
} | 13,094 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure r... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | max | function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
| /**
* @dev Returns the largest of two numbers.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
83,
195
]
} | 13,095 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure r... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | min | function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
| /**
* @dev Returns the smallest of two numbers.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
266,
377
]
} | 13,096 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure r... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | average | function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
| /**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
491,
689
]
} | 13,097 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
251,
437
]
} | 13,098 |
MappingTokenProxy | MappingTokenProxy.sol | 0x910651f81a605a6ef35d05527d24a72fecef8bf0 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://5cc96e9a2269a4df00789b15941aefadf02222853a460560e6c61a9a18fbf346 | {
"func_code_index": [
707,
848
]
} | 13,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.