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
AAmplToken
contracts/protocol/tokenization/ampl/AAmplToken.sol
0x6fbc3be5ee5273598d1491d41bb45f6d05a7541a
Solidity
AAmplToken
contract AAmplToken is VersionedInitializable, IncentivizedERC20, IAToken { using WadRayMath for uint256; using SafeERC20 for IERC20; using UInt256Lib for uint256; using SignedSafeMath for int256; bytes public constant EIP712_REVISION = bytes('1'); bytes32 internal constant EIP712_DOMAIN = keccak256('E...
/** @title Aave-AMPL ERC20 AToken @dev Implementation of the interest bearing AMPL token for the Aave protocol @author AmpleforthOrg The AMPL AToken externally behaves similar to every other aTOKEN. It always maintains a 1:1 peg with the underlying AMPL. The following should always be true. 1) At any time, ...
NatSpecMultiLine
_scaledBalanceOf
function _scaledBalanceOf(uint256 balanceInternal, uint256 totalSupplyInternal, uint256 scaledTotalSupply) private pure returns (uint256) { if (balanceInternal == 0 || scaledTotalSupply == 0) { return 0; } return balanceInternal.wayMul(scaledTotalSupply).wayDiv(totalSupplyInternal); }
/** * @dev balanceOfScaled = balanceInternal / totalSupplyInternal * scaledTotalSupply * = λ . balanceInternal **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 18270, 18577 ] }
16,100
AAmplToken
contracts/protocol/tokenization/ampl/AAmplToken.sol
0x6fbc3be5ee5273598d1491d41bb45f6d05a7541a
Solidity
AAmplToken
contract AAmplToken is VersionedInitializable, IncentivizedERC20, IAToken { using WadRayMath for uint256; using SafeERC20 for IERC20; using UInt256Lib for uint256; using SignedSafeMath for int256; bytes public constant EIP712_REVISION = bytes('1'); bytes32 internal constant EIP712_DOMAIN = keccak256('E...
/** @title Aave-AMPL ERC20 AToken @dev Implementation of the interest bearing AMPL token for the Aave protocol @author AmpleforthOrg The AMPL AToken externally behaves similar to every other aTOKEN. It always maintains a 1:1 peg with the underlying AMPL. The following should always be true. 1) At any time, ...
NatSpecMultiLine
_scaledTotalSupply
function _scaledTotalSupply(ExtData memory e, int256 totalGonsDeposited) private pure returns (uint256) { // require(totalGonsDeposited>=e.totalGonsBorrowed); return _gonsToAMPL(e.totalAMPLSupply, uint256(totalGonsDeposited.sub(e.totalGonsBorrowed))) .add(e.totalPrincipalBorrowed); }
/** * @dev scaledTotalSupply = (totalGonsDeposited - totalGonsBorrowed) / Λ + totalPrincipalBorrowed * = λ . totalSupplyInternal **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 18746, 19048 ] }
16,101
AAmplToken
contracts/protocol/tokenization/ampl/AAmplToken.sol
0x6fbc3be5ee5273598d1491d41bb45f6d05a7541a
Solidity
AAmplToken
contract AAmplToken is VersionedInitializable, IncentivizedERC20, IAToken { using WadRayMath for uint256; using SafeERC20 for IERC20; using UInt256Lib for uint256; using SignedSafeMath for int256; bytes public constant EIP712_REVISION = bytes('1'); bytes32 internal constant EIP712_DOMAIN = keccak256('E...
/** @title Aave-AMPL ERC20 AToken @dev Implementation of the interest bearing AMPL token for the Aave protocol @author AmpleforthOrg The AMPL AToken externally behaves similar to every other aTOKEN. It always maintains a 1:1 peg with the underlying AMPL. The following should always be true. 1) At any time, ...
NatSpecMultiLine
_gonsToAMPL
function _gonsToAMPL(uint256 totalAMPLSupply, uint256 gonValue) private pure returns (uint256) { return gonValue.wayMul(totalAMPLSupply).wayDiv(GONS_TOTAL_SUPPLY); }
/** * @dev Helper method to convert gons to AMPL **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 19111, 19284 ] }
16,102
AAmplToken
contracts/protocol/tokenization/ampl/AAmplToken.sol
0x6fbc3be5ee5273598d1491d41bb45f6d05a7541a
Solidity
AAmplToken
contract AAmplToken is VersionedInitializable, IncentivizedERC20, IAToken { using WadRayMath for uint256; using SafeERC20 for IERC20; using UInt256Lib for uint256; using SignedSafeMath for int256; bytes public constant EIP712_REVISION = bytes('1'); bytes32 internal constant EIP712_DOMAIN = keccak256('E...
/** @title Aave-AMPL ERC20 AToken @dev Implementation of the interest bearing AMPL token for the Aave protocol @author AmpleforthOrg The AMPL AToken externally behaves similar to every other aTOKEN. It always maintains a 1:1 peg with the underlying AMPL. The following should always be true. 1) At any time, ...
NatSpecMultiLine
_amplToGons
function _amplToGons(uint256 totalAMPLSupply, uint256 amplValue) private pure returns (uint256) { return amplValue.mul(GONS_TOTAL_SUPPLY).div(totalAMPLSupply); }
/** * @dev Helper method to convert AMPL to gons **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 19347, 19516 ] }
16,103
AAmplToken
contracts/protocol/tokenization/ampl/AAmplToken.sol
0x6fbc3be5ee5273598d1491d41bb45f6d05a7541a
Solidity
AAmplToken
contract AAmplToken is VersionedInitializable, IncentivizedERC20, IAToken { using WadRayMath for uint256; using SafeERC20 for IERC20; using UInt256Lib for uint256; using SignedSafeMath for int256; bytes public constant EIP712_REVISION = bytes('1'); bytes32 internal constant EIP712_DOMAIN = keccak256('E...
/** @title Aave-AMPL ERC20 AToken @dev Implementation of the interest bearing AMPL token for the Aave protocol @author AmpleforthOrg The AMPL AToken externally behaves similar to every other aTOKEN. It always maintains a 1:1 peg with the underlying AMPL. The following should always be true. 1) At any time, ...
NatSpecMultiLine
_fetchExtData
function _fetchExtData() internal view returns (ExtData memory) { ExtData memory _extContractData; _extContractData.totalAMPLSupply = IERC20(UNDERLYING_ASSET_ADDRESS).totalSupply(); uint256 stablePrincipal; int256 stablePrincipalScaled; (stablePrincipal, stablePrincipalScaled) = IAMPLDebtToken(STABLE_DEBT_TO...
/** * @dev Queries external contracts and fetches data used for aTokenMath * - AMPL scalar form Ampleforth ERC-20 (Λ) * - principal borrowed and Gons borrowed from the debt contracts **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 19729, 20492 ] }
16,104
Holder
contracts/Interface.sol
0x7400e57dffdf7ff2c72618edbca0b2e48d2ae0da
Solidity
ERC1155
interface ERC1155 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be the address of an account/contract that...
/* is ERC165 */
Comment
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data ) external;
/** @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST re...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://813b05344641e3b98807517362f9fe63990468b23583a17cc8d2a35e31efcf85
{ "func_code_index": [ 4203, 4374 ] }
16,105
Holder
contracts/Interface.sol
0x7400e57dffdf7ff2c72618edbca0b2e48d2ae0da
Solidity
ERC1155
interface ERC1155 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be the address of an account/contract that...
/* is ERC165 */
Comment
safeBatchTransferFrom
function safeBatchTransferFrom( address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data ) external;
/** @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://813b05344641e3b98807517362f9fe63990468b23583a17cc8d2a35e31efcf85
{ "func_code_index": [ 6047, 6247 ] }
16,106
Holder
contracts/Interface.sol
0x7400e57dffdf7ff2c72618edbca0b2e48d2ae0da
Solidity
ERC1155
interface ERC1155 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be the address of an account/contract that...
/* is ERC165 */
Comment
balanceOf
function balanceOf(address _owner, uint256 _id) external view returns (uint256);
/** @notice Get the balance of an account's tokens. @param _owner The address of the token holder @param _id ID of the token @return The _owner's balance of the token type requested */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://813b05344641e3b98807517362f9fe63990468b23583a17cc8d2a35e31efcf85
{ "func_code_index": [ 6494, 6606 ] }
16,107
Holder
contracts/Interface.sol
0x7400e57dffdf7ff2c72618edbca0b2e48d2ae0da
Solidity
ERC1155
interface ERC1155 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be the address of an account/contract that...
/* is ERC165 */
Comment
balanceOfBatch
function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);
/** @notice Get the balance of multiple account/token pairs @param _owners The addresses of the token holders @param _ids ID of the tokens @return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair) */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://813b05344641e3b98807517362f9fe63990468b23583a17cc8d2a35e31efcf85
{ "func_code_index": [ 6907, 7057 ] }
16,108
Holder
contracts/Interface.sol
0x7400e57dffdf7ff2c72618edbca0b2e48d2ae0da
Solidity
ERC1155
interface ERC1155 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be the address of an account/contract that...
/* is ERC165 */
Comment
setApprovalForAll
function setApprovalForAll(address _operator, bool _approved) external;
/** @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. @dev MUST emit the ApprovalForAll event on success. @param _operator Address to add to the set of authorized operators @param _approved True if the operator is approved, false to revoke approval */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://813b05344641e3b98807517362f9fe63990468b23583a17cc8d2a35e31efcf85
{ "func_code_index": [ 7414, 7490 ] }
16,109
Holder
contracts/Interface.sol
0x7400e57dffdf7ff2c72618edbca0b2e48d2ae0da
Solidity
ERC1155
interface ERC1155 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be the address of an account/contract that...
/* is ERC165 */
Comment
isApprovedForAll
function isApprovedForAll(address _owner, address _operator) external view returns (bool);
/** @notice Queries the approval status of an operator for a given owner. @param _owner The owner of the tokens @param _operator Address of authorized operator @return True if the operator is approved, false if not */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://813b05344641e3b98807517362f9fe63990468b23583a17cc8d2a35e31efcf85
{ "func_code_index": [ 7772, 7894 ] }
16,110
Holder
contracts/Interface.sol
0x7400e57dffdf7ff2c72618edbca0b2e48d2ae0da
Solidity
ERC20
interface ERC20 { /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external ...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://813b05344641e3b98807517362f9fe63990468b23583a17cc8d2a35e31efcf85
{ "func_code_index": [ 240, 340 ] }
16,111
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Owned
contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = 0xB94403fc829FEeCf135F64aaF2d87C508728cAFC; } modifier onlyOwner { require(msg.sender == owner); _; } ...
// ---------------------------------------------------------------------------- // Ownership contract // _newOwner is address of new owner // ----------------------------------------------------------------------------
LineComment
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0x0)); emit OwnershipTransferred(owner,_newOwner); owner = _newOwner; }
// transfer Ownership to other address
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 360, 562 ] }
16,112
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
function() public payable { buyTokens(); }
// ---------------------------------------------------------------------------- // It invokes when someone sends ETH to this contract address // requires enough gas for execution // ----------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 1426, 1487 ] }
16,113
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
buyTokens
function buyTokens() onlyWhenRunning public payable { require(msg.value > 0); uint tokens = msg.value.mul(RATE).div(DENOMINATOR); require(balances[owner] >= tokens); balances[msg.sender] = balances[msg.sender].add(tokens); balances[owner] = balances[owner].sub(tokens); ...
// ---------------------------------------------------------------------------- // Function to handle eth and token transfers // tokens are transferred to user // ETH are transferred to current owner // ----------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 1805, 2258 ] }
16,114
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public view returns (uint) { return _totalSupply; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 2454, 2547 ] }
16,115
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 2769, 2894 ] }
16,116
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { require(to != address(0)); require(tokens > 0); require(balances[msg.sender] >= tokens); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg....
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 3240, 3638 ] }
16,117
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { require(spender != address(0)); require(tokens > 0); allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval do...
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 4150, 4444 ] }
16,118
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { require(from != address(0)); require(to != address(0)); require(tokens > 0); require(balances[from] >= tokens); require(allowed[from][msg.sender] >= tokens); balances[from] = balances[fro...
// ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfe...
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 4943, 5504 ] }
16,119
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 5787, 5939 ] }
16,120
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { require(_spender != address(0)); allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
// ------------------------------------------------------------------------ // Increase the amount of tokens that an owner allowed to a spender. // // approve should be called when allowed[_spender] == 0. To increment // allowed value is better to use this function to avoid 2 calls (and wait until // the first transact...
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 6525, 6862 ] }
16,121
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { require(_spender != address(0)); uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_s...
// ------------------------------------------------------------------------ // Decrease the amount of tokens that an owner allowed to a spender. // // approve should be called when allowed[_spender] == 0. To decrement // allowed value is better to use this function to avoid 2 calls (and wait until // the first transact...
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 7453, 7960 ] }
16,122
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
changeRate
function changeRate(uint256 _rate) public onlyOwner { require(_rate > 0); RATE =_rate; emit ChangeRate(_rate); }
// ------------------------------------------------------------------------ // Change the ETH to IO rate // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 8169, 8328 ] }
16,123
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
mint
function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { require(_to != address(0)); require(_amount > 0); uint newamount = _amount * 10**uint(decimals); _totalSupply = _totalSupply.add(newamount); balances[_to] = balances[_to].add(newamount); emit ...
// ------------------------------------------------------------------------ // Function to mint tokens // _to The address that will receive the minted tokens. // _amount The amount of tokens to mint. // A boolean that indicates if the operation was successful. // --------------------------------------------------------...
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 8708, 9159 ] }
16,124
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
stopICO
function stopICO() onlyOwner public { isStopped = true; }
// ------------------------------------------------------------------------ // function to stop the ICO // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 9367, 9443 ] }
16,125
Solereum_Cash
Solereum_Cash.sol
0xa69431858db49bda621192c29f366be4d386ccaf
Solidity
Solereum_Cash
contract Solereum_Cash is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public RATE; uint public DENOMINATOR; bool public isStopped = false; mapping(address => uint)...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
resumeICO
function resumeICO() onlyOwner public { isStopped = false; }
// ------------------------------------------------------------------------ // function to resume ICO // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
None
bzzr://c2ef90f56b79ef2f595bb76d55f8b55b75ad26129bc843f280300394278b1f5d
{ "func_code_index": [ 9649, 9728 ] }
16,126
OracleFactory
contracts/commons/SortedList.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
SortedList
library SortedList { using SortedList for SortedList.List; uint256 private constant HEAD = 0; struct List { uint256 size; mapping(uint256 => uint256) values; mapping(uint256 => uint256) links; mapping(uint256 => bool) exists; } /** * @dev Returns ...
/** * @title SortedList * @author Joaquin Gonzalez & Agustin Aguilar (jpgonzalezra@gmail.com & agusxrun@gmail.com) * @dev An utility library for using sorted list data structures. */
NatSpecMultiLine
get
function get(List storage self, uint256 _node) internal view returns (uint256) { return self.values[_node]; }
/** * @dev Returns the value of a `_node` * @param self stored linked list from contract * @param _node a node to search value of * @return value of the node */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 487, 615 ] }
16,127
OracleFactory
contracts/commons/SortedList.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
SortedList
library SortedList { using SortedList for SortedList.List; uint256 private constant HEAD = 0; struct List { uint256 size; mapping(uint256 => uint256) values; mapping(uint256 => uint256) links; mapping(uint256 => bool) exists; } /** * @dev Returns ...
/** * @title SortedList * @author Joaquin Gonzalez & Agustin Aguilar (jpgonzalezra@gmail.com & agusxrun@gmail.com) * @dev An utility library for using sorted list data structures. */
NatSpecMultiLine
set
function set(List storage self, uint256 _node, uint256 _value) internal { // Check if node previusly existed if (self.exists[_node]) { // Load the new and old position (uint256 leftOldPos, uint256 leftNewPos) = self.findOldAndNewLeftPosition(_node, _value); // If node position c...
/** * @dev Insert node `_node` with a value * @param self stored linked list from contract * @param _node new node to insert * @param _value value of the new `_node` to insert * @notice If the `_node` does not exists, it's added to the list * if the `_node` already exists, it updates its value. */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 966, 2261 ] }
16,128
OracleFactory
contracts/commons/SortedList.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
SortedList
library SortedList { using SortedList for SortedList.List; uint256 private constant HEAD = 0; struct List { uint256 size; mapping(uint256 => uint256) values; mapping(uint256 => uint256) links; mapping(uint256 => bool) exists; } /** * @dev Returns ...
/** * @title SortedList * @author Joaquin Gonzalez & Agustin Aguilar (jpgonzalezra@gmail.com & agusxrun@gmail.com) * @dev An utility library for using sorted list data structures. */
NatSpecMultiLine
findOldAndNewLeftPosition
function findOldAndNewLeftPosition( List storage self, uint256 _node, uint256 _value ) internal view returns ( uint256 leftNodePos, uint256 leftValPos ) { // Find old and new value positions bool foundNode; bool foundVal; // Iterate links uint256 c = HEAD; whil...
/** * @dev Returns the previus node of a given `_node` * alongside to the previus node of a hypothetical new `_value` * @param self stored linked list from contract * @param _node a node to search for its left node * @param _value a value to seach for its hypothetical left node * @return `leftNodePost` th...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 2901, 4076 ] }
16,129
OracleFactory
contracts/commons/SortedList.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
SortedList
library SortedList { using SortedList for SortedList.List; uint256 private constant HEAD = 0; struct List { uint256 size; mapping(uint256 => uint256) values; mapping(uint256 => uint256) links; mapping(uint256 => bool) exists; } /** * @dev Returns ...
/** * @title SortedList * @author Joaquin Gonzalez & Agustin Aguilar (jpgonzalezra@gmail.com & agusxrun@gmail.com) * @dev An utility library for using sorted list data structures. */
NatSpecMultiLine
findLeftPosition
function findLeftPosition(List storage self, uint256 _value) internal view returns (uint256) { uint256 next = HEAD; uint256 c; do { c = next; next = self.links[c]; } while(self.values[next] < _value && next != 0); return c; }
/** * @dev Get the left node for a given hypothetical `_value` * @param self stored linked list from contract * @param _value value to seek * @return uint256 left node for the given value */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 4305, 4615 ] }
16,130
OracleFactory
contracts/commons/SortedList.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
SortedList
library SortedList { using SortedList for SortedList.List; uint256 private constant HEAD = 0; struct List { uint256 size; mapping(uint256 => uint256) values; mapping(uint256 => uint256) links; mapping(uint256 => bool) exists; } /** * @dev Returns ...
/** * @title SortedList * @author Joaquin Gonzalez & Agustin Aguilar (jpgonzalezra@gmail.com & agusxrun@gmail.com) * @dev An utility library for using sorted list data structures. */
NatSpecMultiLine
nodeAt
function nodeAt(List storage self, uint256 _position) internal view returns (uint256) { uint256 next = self.links[HEAD]; for (uint256 i = 0; i < _position; i++) { next = self.links[next]; } return next; }
/** * @dev Get the node on a given `_position` * @param self stored linked list from contract * @param _position node position to retrieve * @return the node key */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 4818, 5083 ] }
16,131
OracleFactory
contracts/commons/SortedList.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
SortedList
library SortedList { using SortedList for SortedList.List; uint256 private constant HEAD = 0; struct List { uint256 size; mapping(uint256 => uint256) values; mapping(uint256 => uint256) links; mapping(uint256 => bool) exists; } /** * @dev Returns ...
/** * @title SortedList * @author Joaquin Gonzalez & Agustin Aguilar (jpgonzalezra@gmail.com & agusxrun@gmail.com) * @dev An utility library for using sorted list data structures. */
NatSpecMultiLine
remove
function remove(List storage self, uint256 _node) internal { require(self.exists[_node], "the node does not exists"); uint256 c = self.links[HEAD]; while (c != 0) { uint256 next = self.links[c]; if (next == _node) { break; } c = next; } sel...
/** * @dev Removes an entry from the sorted list * @param self stored linked list from contract * @param _node node to remove from the list */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 5258, 5794 ] }
16,132
OracleFactory
contracts/commons/SortedList.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
SortedList
library SortedList { using SortedList for SortedList.List; uint256 private constant HEAD = 0; struct List { uint256 size; mapping(uint256 => uint256) values; mapping(uint256 => uint256) links; mapping(uint256 => bool) exists; } /** * @dev Returns ...
/** * @title SortedList * @author Joaquin Gonzalez & Agustin Aguilar (jpgonzalezra@gmail.com & agusxrun@gmail.com) * @dev An utility library for using sorted list data structures. */
NatSpecMultiLine
median
function median(List storage self) internal view returns (uint256) { uint256 elements = self.size; if (elements % 2 == 0) { uint256 node = self.nodeAt(elements / 2 - 1); return Math.average(self.values[node], self.values[self.links[node]]); } else { return self.values[self.node...
/** * @dev Get median beetween entry from the sorted list * @param self stored linked list from contract * @return uint256 the median */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 5963, 6348 ] }
16,133
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
symbol
function symbol() external view returns (string memory) { return isymbol; }
/** * @return metadata, 3 or 4 letter symbol of the currency provided by this oracle * (ej: ARS) * @notice Defined by the RCN RateOracle interface */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 1503, 1597 ] }
16,134
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
name
function name() external view returns (string memory) { return iname; }
/** * @return metadata, full name of the currency provided by this oracle * (ej: Argentine Peso) * @notice Defined by the RCN RateOracle interface */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 1781, 1871 ] }
16,135
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
decimals
function decimals() external view returns (uint256) { return idecimals; }
/** * @return metadata, decimals to express the common denomination * of the currency provided by this oracle * @notice Defined by the RCN RateOracle interface */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 2068, 2160 ] }
16,136
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
token
function token() external view returns (address) { return itoken; }
/** * @return metadata, token address of the currency provided by this oracle * @notice Defined by the RCN RateOracle interface */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 2317, 2403 ] }
16,137
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
currency
function currency() external view returns (bytes32) { return icurrency; }
/** * @return metadata, bytes32 code of the currency provided by this oracle * @notice Defined by the RCN RateOracle interface */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 2559, 2651 ] }
16,138
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
maintainer
function maintainer() external view returns (string memory) { return imaintainer; }
/** * @return metadata, human readable name of the entity maintainer of this oracle * @notice Defined by the RCN RateOracle interface */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 2814, 2916 ] }
16,139
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
url
function url() external view returns (string memory) { return ""; }
/** * @dev Returns the URL required to retrieve the auxiliary data * as specified by the RateOracle spec, no auxiliary data is required * so it returns an empty string. * @return An empty string, because the auxiliary data is not required * @notice Defined by the RCN RateOracle interface */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 3256, 3342 ] }
16,140
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
setMetadata
function setMetadata( string calldata _name, uint256 _decimals, string calldata _maintainer ) external onlyOwner { iname = _name; idecimals = _decimals; imaintainer = _maintainer; }
/** * @dev Updates the medatada of the oracle * @param _name Name of the oracle currency * @param _decimals Decimals for the common representation of the currency * @param _maintainer Name of the maintainer entity of the Oracle */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 3611, 3861 ] }
16,141
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
setUpgrade
function setUpgrade(RateOracle _upgrade) external onlyOwner { upgrade = _upgrade; }
/** * @dev Updates the Oracle contract, all subsequent calls to `readSample` will be forwareded to `_upgrade` * @param _upgrade Contract address of the new updated oracle * @notice If the `upgrade` address is set to the address `0` the Oracle is considered not upgraded */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 4166, 4268 ] }
16,142
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
addSigner
function addSigner(address _signer, string calldata _name) external onlyOwner { require(!isSigner[_signer], "signer already defined"); require(signerWithName[_name] == address(0), "name already in use"); require(bytes(_name).length > 0, "name can't be empty"); isSigner[_signer] = true; signerWi...
/** * @dev Adds a `_signer` who is going to be able to provide a new rate * @param _signer Address of the signer * @param _name Metadata - Human readable name of the signer */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 4476, 4892 ] }
16,143
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
setName
function setName(address _signer, string calldata _name) external onlyOwner { require(isSigner[_signer], "signer not defined"); require(signerWithName[_name] == address(0), "name already in use"); require(bytes(_name).length > 0, "name can't be empty"); string memory oldName = nameOfSigner[_signer];...
/** * @dev Updates the `_name` metadata of a given `_signer` * @param _signer Address of the signer * @param _name Metadata - Human readable name of the signer */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 5087, 5564 ] }
16,144
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
removeSigner
function removeSigner(address _signer) external onlyOwner { require(isSigner[_signer], "address is not a signer"); string memory signerName = nameOfSigner[_signer]; isSigner[_signer] = false; signerWithName[signerName] = address(0); nameOfSigner[_signer] = ""; // Only remove from list ...
/** * @dev Removes an existing `_signer`, removing any provided rate * @param _signer Address of the signer */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 5701, 6180 ] }
16,145
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
provide
function provide(address _signer, uint256 _rate) external onlyOwner { require(isSigner[_signer], "signer not valid"); require(_rate != 0, "rate can't be zero"); list.set(uint256(_signer), _rate); }
/** * @dev Provides a `_rate` for a given `_signer` * @param _signer Address of the signer who is providing the rate * @param _rate Rate to be provided * @notice This method can only be called by the Owner and not by the signer * this is intended to allow the `OracleFactory.sol` to provide multiple rates ...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 6663, 6897 ] }
16,146
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
readSample
function readSample(bytes memory _oracleData) public view returns (uint256 _tokens, uint256 _equivalent) { // Check if paused require(!paused && !pausedProvider.isPaused(), "contract paused"); // Check if Oracle contract has been upgraded RateOracle _upgrade = upgrade; if (address(_upgrade) !...
/** * @dev Reads the rate provided by the Oracle * this being the median of the last rate provided by each signer * @param _oracleData Oracle auxiliar data defined in the RCN Oracle spec * not used for this oracle, but forwarded in case of upgrade. * @return `_equivalent` is the median of the values provi...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 7354, 7885 ] }
16,147
OracleFactory
contracts/MultiSourceOracle.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
MultiSourceOracle
contract MultiSourceOracle is RateOracle, Ownable, Pausable { using SortedList for SortedList.List; using StringUtils for string; uint256 public constant BASE = 10 ** 36; mapping(address => bool) public isSigner; mapping(address => string) public nameOfSigner; mapping(string => address...
readSample
function readSample() external view returns (uint256 _tokens, uint256 _equivalent) { (_tokens, _equivalent) = readSample(new bytes(0)); }
/** * @dev Reads the rate provided by the Oracle * this being the median of the last rate provided by each signer * @return `_equivalent` is the median of the values provided by the signer * `_tokens` are equivalent to `_equivalent` in the currency of the Oracle * @notice This Oracle accepts reading the s...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 8271, 8427 ] }
16,148
RCHARTpredictionV1
RCHARTpredictionV1.sol
0x05ecc2bc49232905698f729ffab51653f7b80cd8
Solidity
EnumerableSet
library EnumerableSet { struct Set { bytes32[] _values; mapping (bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._...
/** * @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) uint2...
/** * @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.12+commit.27d51765
None
ipfs://ed208655542dd6d2958fd73354f3b51e498f654ebcc612f67a7ce78a5ba4a3f3
{ "func_code_index": [ 716, 1593 ] }
16,149
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 94, 154 ] }
16,150
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 235, 308 ] }
16,151
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 530, 612 ] }
16,152
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 889, 977 ] }
16,153
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 1639, 1718 ] }
16,154
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** ...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 2029, 2131 ] }
16,155
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
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
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 259, 445 ] }
16,156
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
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
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 721, 862 ] }
16,157
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 1158, 1353 ] }
16,158
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 1605, 2077 ] }
16,159
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 2546, 2683 ] }
16,160
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 3172, 3453 ] }
16,161
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 3911, 4046 ] }
16,162
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 4524, 4695 ] }
16,163
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 606, 1230 ] }
16,164
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 2158, 2560 ] }
16,165
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 3314, 3492 ] }
16,166
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 3715, 3916 ] }
16,167
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 4284, 4515 ] }
16,168
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 4764, 5085 ] }
16,169
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 = _msgSender...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 493, 577 ] }
16,170
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 = _msgSender...
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.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 1131, 1284 ] }
16,171
FeedEveryDoge
FeedEveryDoge.sol
0x3dbbc9be0b30af7cc3e59b2001132df808dab404
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 = _msgSender...
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.12+commit.27d51765
None
ipfs://24d7dfbc340766692e625a42f02bb7ff414c805f94be1ff1a02b15c2a9e2d906
{ "func_code_index": [ 1432, 1681 ] }
16,172
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
newOracle
function newOracle( string calldata _symbol, string calldata _name, uint256 _decimals, address _token, string calldata _maintainer ) external onlyOwner { // Check for duplicated oracles require(symbolToOracle[_symbol] == address(0), "Oracle already exists"); // Create oracle con...
/** * @dev Creates a new Oracle contract for a given `_symbol` * @param _symbol metadata symbol for the currency of the oracle to create * @param _name metadata name for the currency of the oracle * @param _decimals metadata number of decimals to express the common denomination of the currency * @param _token...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 1794, 2798 ] }
16,173
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
isPaused
function isPaused() external view returns (bool) { return paused; }
/** * @return true if the Oracle ecosystem is paused * @notice Used by PausedProvided and readed by the Oracles on each `readSample()` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 2962, 3048 ] }
16,174
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
addSigner
function addSigner(address _oracle, address _signer, string calldata _name) external onlyOwner { MultiSourceOracle(_oracle).addSigner(_signer, _name); emit AddSigner(_oracle, _signer, _name); }
/** * @dev Adds a `_signer` to a given `_oracle` * @param _oracle Address of the oracle on which add the `_signer` * @param _signer Address of the signer to be added * @param _name Human readable metadata name of the `_signer` * @notice Acts as a proxy of `_oracle.addSigner` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 3371, 3592 ] }
16,175
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
addSignerToOracles
function addSignerToOracles( address[] calldata _oracles, address _signer, string calldata _name ) external onlyOwner { for (uint256 i = 0; i < _oracles.length; i++) { address oracle = _oracles[i]; MultiSourceOracle(oracle).addSigner(_signer, _name); emit AddSigner(oracle...
/** * @dev Adds a `_signer` to multiple `_oracles` * @param _oracles List of oracles on which add the `_signer` * @param _signer Address of the signer to be added * @param _name Human readable metadata name of the `_signer` * @notice Acts as a proxy for all the `_oracles` `_oracle.addSigner` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 3932, 4325 ] }
16,176
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
setName
function setName(address _oracle, address _signer, string calldata _name) external onlyOwner { MultiSourceOracle(_oracle).setName(_signer, _name); emit UpdateSignerName( _oracle, _signer, _name ); }
/** * @dev Updates the `_name` of a given `_signer`@`_oracle` * @param _oracle Address of the oracle on which the `_signer` it's found * @param _signer Address of the signer to be updated * @param _name Human readable metadata name of the `_signer` * @notice Acts as a proxy of `_oracle.setName` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 4668, 4942 ] }
16,177
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
removeSigner
function removeSigner(address _oracle, address _signer) external onlyOwner { MultiSourceOracle(_oracle).removeSigner(_signer); emit RemoveSigner(_oracle, _signer); }
/** * @dev Removes a `_signer` to a given `_oracle` * @param _oracle Address of the oracle on which remove the `_signer` * @param _signer Address of the signer to be removed * @notice Acts as a proxy of `_oracle.removeSigner` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 5209, 5402 ] }
16,178
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
removeSignerFromOracles
function removeSignerFromOracles( address[] calldata _oracles, address _signer ) external onlyOwner { for (uint256 i = 0; i < _oracles.length; i++) { address oracle = _oracles[i]; MultiSourceOracle(oracle).removeSigner(_signer); emit RemoveSigner(oracle, _signer); } }
/** * @dev Removes a `_signer` from multiple `_oracles` * @param _oracles List of oracles on which remove the `_signer` * @param _signer Address of the signer to be removed * @notice Acts as a proxy for all the `_oracles` `_oracle.removeSigner` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 5690, 6048 ] }
16,179
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
provide
function provide(address _oracle, uint256 _rate) external { MultiSourceOracle(_oracle).provide(msg.sender, _rate); emit Provide(_oracle, msg.sender, _rate); }
/** * @dev Provides a `_rate` for a given `_oracle`, msg.sener becomes the `signer` * @param _oracle Address of the oracle on which provide the rate * @param _rate Rate to be provided * @notice Acts as a proxy of `_oracle.provide`, using the parameter `msg.sender` as signer */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 6364, 6550 ] }
16,180
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
provideMultiple
function provideMultiple( address[] calldata _oracles, uint256[] calldata _rates ) external { uint256 length = _oracles.length; require(length == _rates.length, "arrays should have the same size"); for (uint256 i = 0; i < length; i++) { address oracle = _oracles[i]; uint256...
/** * @dev Provides multiple rates for a set of oracles, with the same signer * msg.sender becomes the signer for all the provides * * @param _oracles List of oracles to provide a rate for * @param _rates List of rates to provide * @notice Acts as a proxy for multiples `_oracle.provide`, using the paramet...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 6937, 7449 ] }
16,181
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
setUpgrade
function setUpgrade(address _oracle, address _upgrade) external onlyOwner { MultiSourceOracle(_oracle).setUpgrade(RateOracle(_upgrade)); emit Upgraded(_oracle, _upgrade); }
/** * @dev Updates the Oracle contract, all subsequent calls to `readSample` will be forwareded to `_upgrade` * @param _oracle oracle address to be upgraded * @param _upgrade contract address of the new updated oracle * @notice Acts as a proxy of `_oracle.setUpgrade` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 7758, 7958 ] }
16,182
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
pauseOracle
function pauseOracle(address _oracle) external { require( canPause[msg.sender] || msg.sender == _owner, "not authorized to pause" ); MultiSourceOracle(_oracle).pause(); emit OraclePaused(_oracle, msg.sender); }
/** * @dev Pauses the given `_oracle` * @param _oracle oracle address to be paused * @notice Acts as a proxy of `_oracle.pause` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 8121, 8418 ] }
16,183
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
startOracle
function startOracle(address _oracle) external onlyOwner { MultiSourceOracle(_oracle).start(); emit OracleStarted(_oracle); }
/** * @dev Starts the given `_oracle` * @param _oracle oracle address to be started * @notice Acts as a proxy of `_oracle.start` */
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 8582, 8735 ] }
16,184
OracleFactory
contracts/OracleFactory.sol
0x1101c52fc25dc6d2691cec4b06569cef3c83933c
Solidity
OracleFactory
contract OracleFactory is Ownable, Pausable, PausedProvider { mapping(string => address) public symbolToOracle; mapping(address => string) public oracleToSymbol; event NewOracle( string _symbol, address _oracle, string _name, uint256 _decimals, address _toke...
setMetadata
function setMetadata( address _oracle, string calldata _name, uint256 _decimals, string calldata _maintainer ) external onlyOwner { MultiSourceOracle(_oracle).setMetadata( _name, _decimals, _maintainer ); emit UpdatedMetadata( _oracle, _...
/** * @dev Updates the medatada of the oracle * @param _oracle oracle address to update its metadata * @param _name Name of the oracle currency * @param _decimals Decimals for the common representation of the currency * @param _maintainer Name of the maintainer entity of the Oracle * @notice Acts as a proxy...
NatSpecMultiLine
v0.5.12+commit.7709ece9
GNU GPLv3
bzzr://eba975dd187864082d14c6245f52ce14bd90dde2a9adcb6e6a4fb661b3119d6c
{ "func_code_index": [ 9122, 9572 ] }
16,185
OptimismMessengerWrapper
contracts/wrappers/OptimismMessengerWrapper.sol
0xc78c53102e161094d848ee167145e5d45eaa6853
Solidity
OptimismMessengerWrapper
contract OptimismMessengerWrapper is MessengerWrapper, Ownable { iOVM_L1CrossDomainMessenger public immutable l1MessengerAddress; address public immutable l2BridgeAddress; uint256 public defaultL2GasLimit; mapping (bytes4 => uint256) public l2GasLimitForSignature; constructor( addr...
/** * @dev A MessengerWrapper for Optimism - https://community.optimism.io/docs/ * @notice Deployed on layer-1 */
NatSpecMultiLine
sendCrossDomainMessage
function sendCrossDomainMessage(bytes memory _calldata) public override onlyL1Bridge { uint256 l2GasLimit = l2GasLimitForCalldata(_calldata); l1MessengerAddress.sendMessage( l2BridgeAddress, _calldata, uint32(l2GasLimit) ); }
/** * @dev Sends a message to the l2BridgeAddress from layer-1 * @param _calldata The data that l2BridgeAddress will be called with */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://db6c1ad31cc31c72315efb84186ab4b2f8151c3846d20f4d9ba28f39bc4a8c5c
{ "func_code_index": [ 859, 1162 ] }
16,186
OptimismMessengerWrapper
contracts/wrappers/OptimismMessengerWrapper.sol
0xc78c53102e161094d848ee167145e5d45eaa6853
Solidity
OptimismMessengerWrapper
contract OptimismMessengerWrapper is MessengerWrapper, Ownable { iOVM_L1CrossDomainMessenger public immutable l1MessengerAddress; address public immutable l2BridgeAddress; uint256 public defaultL2GasLimit; mapping (bytes4 => uint256) public l2GasLimitForSignature; constructor( addr...
/** * @dev A MessengerWrapper for Optimism - https://community.optimism.io/docs/ * @notice Deployed on layer-1 */
NatSpecMultiLine
l2GasLimitForCalldata
function l2GasLimitForCalldata(bytes memory _calldata) private view returns (uint256) { uint256 l2GasLimit; if (_calldata.length >= 4) { bytes4 functionSignature = bytes4(toUint32(_calldata, 0)); l2GasLimit = l2GasLimitForSignature[functionSignature]; } if (l2GasLimit == 0) { ...
// Private functions
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://db6c1ad31cc31c72315efb84186ab4b2f8151c3846d20f4d9ba28f39bc4a8c5c
{ "func_code_index": [ 1891, 2331 ] }
16,187
OptimismMessengerWrapper
contracts/wrappers/OptimismMessengerWrapper.sol
0xc78c53102e161094d848ee167145e5d45eaa6853
Solidity
OptimismMessengerWrapper
contract OptimismMessengerWrapper is MessengerWrapper, Ownable { iOVM_L1CrossDomainMessenger public immutable l1MessengerAddress; address public immutable l2BridgeAddress; uint256 public defaultL2GasLimit; mapping (bytes4 => uint256) public l2GasLimitForSignature; constructor( addr...
/** * @dev A MessengerWrapper for Optimism - https://community.optimism.io/docs/ * @notice Deployed on layer-1 */
NatSpecMultiLine
toUint32
function toUint32(bytes memory _bytes, uint256 _start) private pure returns (uint32) { require(_bytes.length >= _start + 4, "OVM_MSG_WPR: out of bounds"); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; }
// source: https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://db6c1ad31cc31c72315efb84186ab4b2f8151c3846d20f4d9ba28f39bc4a8c5c
{ "func_code_index": [ 2431, 2755 ] }
16,188
Migrator
contracts/interfaces/IMigrator.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IMigrator
interface IMigrator { function isSafeClaimed(uint256 _index) external view returns (bool); function migrateSafe2() external; function claim(uint256 _index, uint256 _amount, bytes32[] calldata _merkleProof) external; /// @notice only governance function transferMintingRights(address _newAddress) external; }
/** * @title COVER token migrator * @author crypto-pumpkin@github + @Kiwi */
NatSpecMultiLine
transferMintingRights
function transferMintingRights(address _newAddress) external;
/// @notice only governance
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 253, 316 ] }
16,189
Migrator
contracts/interfaces/IBlacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IBlacksmith
interface IBlacksmith { struct Miner { uint256 amount; uint256 rewardWriteoff; // the amount of COVER tokens to write off when calculate rewards from last update uint256 bonusWriteoff; // the amount of bonus tokens to write off when calculate rewards from last update } struct Pool { uint256 weigh...
/** * @title Interface of COVER shield mining contract Blacksmith * @author crypto-pumpkin@github */
NatSpecMultiLine
getPoolList
function getPoolList() external view returns (address[] memory);
// View functions
LineComment
v0.7.4+commit.3f05b770
{ "func_code_index": [ 1043, 1109 ] }
16,190
Migrator
contracts/interfaces/IBlacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IBlacksmith
interface IBlacksmith { struct Miner { uint256 amount; uint256 rewardWriteoff; // the amount of COVER tokens to write off when calculate rewards from last update uint256 bonusWriteoff; // the amount of bonus tokens to write off when calculate rewards from last update } struct Pool { uint256 weigh...
/** * @title Interface of COVER shield mining contract Blacksmith * @author crypto-pumpkin@github */
NatSpecMultiLine
claimRewardsForPools
function claimRewardsForPools(address[] calldata _lpTokens) external;
// function minedRewards(address _lpToken, address _miner) external view returns (uint256); // function minedBonus(address _lpToken, address _miner) external view returns (uint256 _minedBonus, address _bonusToken); // User action functions
LineComment
v0.7.4+commit.3f05b770
{ "func_code_index": [ 1478, 1549 ] }
16,191
Migrator
contracts/interfaces/IBlacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IBlacksmith
interface IBlacksmith { struct Miner { uint256 amount; uint256 rewardWriteoff; // the amount of COVER tokens to write off when calculate rewards from last update uint256 bonusWriteoff; // the amount of bonus tokens to write off when calculate rewards from last update } struct Pool { uint256 weigh...
/** * @title Interface of COVER shield mining contract Blacksmith * @author crypto-pumpkin@github */
NatSpecMultiLine
addBonusToken
function addBonusToken(address _lpToken, address _bonusToken, uint256 _startTime, uint256 _endTime, uint256 _totalBonus) external;
// Partner action functions
LineComment
v0.7.4+commit.3f05b770
{ "func_code_index": [ 1819, 1951 ] }
16,192
Migrator
contracts/interfaces/IBlacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IBlacksmith
interface IBlacksmith { struct Miner { uint256 amount; uint256 rewardWriteoff; // the amount of COVER tokens to write off when calculate rewards from last update uint256 bonusWriteoff; // the amount of bonus tokens to write off when calculate rewards from last update } struct Pool { uint256 weigh...
/** * @title Interface of COVER shield mining contract Blacksmith * @author crypto-pumpkin@github */
NatSpecMultiLine
updatePool
function updatePool(address _lpToken) external;
// COVER mining actions
LineComment
v0.7.4+commit.3f05b770
{ "func_code_index": [ 1979, 2028 ] }
16,193
Migrator
contracts/interfaces/IBlacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IBlacksmith
interface IBlacksmith { struct Miner { uint256 amount; uint256 rewardWriteoff; // the amount of COVER tokens to write off when calculate rewards from last update uint256 bonusWriteoff; // the amount of bonus tokens to write off when calculate rewards from last update } struct Pool { uint256 weigh...
/** * @title Interface of COVER shield mining contract Blacksmith * @author crypto-pumpkin@github */
NatSpecMultiLine
collectDust
function collectDust(address _token) external;
/// @notice dust will be collected to COVER treasury
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 2147, 2195 ] }
16,194
Migrator
contracts/interfaces/IBlacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IBlacksmith
interface IBlacksmith { struct Miner { uint256 amount; uint256 rewardWriteoff; // the amount of COVER tokens to write off when calculate rewards from last update uint256 bonusWriteoff; // the amount of bonus tokens to write off when calculate rewards from last update } struct Pool { uint256 weigh...
/** * @title Interface of COVER shield mining contract Blacksmith * @author crypto-pumpkin@github */
NatSpecMultiLine
addPool
function addPool(address _lpToken, uint256 _weight) external;
/// @notice only dev
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 2276, 2339 ] }
16,195
Migrator
contracts/interfaces/IBlacksmith.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
IBlacksmith
interface IBlacksmith { struct Miner { uint256 amount; uint256 rewardWriteoff; // the amount of COVER tokens to write off when calculate rewards from last update uint256 bonusWriteoff; // the amount of bonus tokens to write off when calculate rewards from last update } struct Pool { uint256 weigh...
/** * @title Interface of COVER shield mining contract Blacksmith * @author crypto-pumpkin@github */
NatSpecMultiLine
updatePoolWeights
function updatePoolWeights(address[] calldata _lpTokens, uint256[] calldata _weights) external;
/// @notice only governance
NatSpecSingleLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 2540, 2637 ] }
16,196
Migrator
contracts/utils/SafeMath.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) {...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming language...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 248, 428 ] }
16,197
Migrator
contracts/utils/SafeMath.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) {...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming language...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 695, 833 ] }
16,198
Migrator
contracts/utils/SafeMath.sol
0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) {...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming language...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.7.4+commit.3f05b770
{ "func_code_index": [ 1120, 1311 ] }
16,199