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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RenExAtomicSwapper | RenExAtomicSwapper.sol | 0xd5faef6b5ee44391ffaa42d732c88b86c73ed287 | Solidity | RenExAtomicSwapper | contract RenExAtomicSwapper {
string public VERSION; // Passed in as a constructor parameter.
struct Swap {
uint256 timelock;
uint256 value;
address ethTrader;
address withdrawTrader;
bytes32 secretLock;
bytes32 secretKey;
}
enum States {
... | /// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface
/// for Ether values. Does not support ERC20 tokens. | NatSpecSingleLine | refund | function refund(bytes32 _swapID) external onlyOpenSwaps(_swapID) onlyExpirableSwaps(_swapID) {
// Expire the swap.
Swap memory swap = swaps[_swapID];
swapStates[_swapID] = States.EXPIRED;
// Transfer the ETH value from this contract back to the ETH trader.
swap.ethTrader.transfer(swap.value);... | /// @notice Refunds an atomic swap.
///
/// @param _swapID The unique atomic swap id. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a | {
"func_code_index": [
3956,
4374
]
} | 26,500 | |
RenExAtomicSwapper | RenExAtomicSwapper.sol | 0xd5faef6b5ee44391ffaa42d732c88b86c73ed287 | Solidity | RenExAtomicSwapper | contract RenExAtomicSwapper {
string public VERSION; // Passed in as a constructor parameter.
struct Swap {
uint256 timelock;
uint256 value;
address ethTrader;
address withdrawTrader;
bytes32 secretLock;
bytes32 secretKey;
}
enum States {
... | /// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface
/// for Ether values. Does not support ERC20 tokens. | NatSpecSingleLine | audit | function audit(bytes32 _swapID) external view returns (uint256 timelock, uint256 value, address to, address from, bytes32 secretLock) {
Swap memory swap = swaps[_swapID];
return (swap.timelock, swap.value, swap.withdrawTrader, swap.ethTrader, swap.secretLock);
}
| /// @notice Audits an atomic swap.
///
/// @param _swapID The unique atomic swap id. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a | {
"func_code_index": [
4477,
4767
]
} | 26,501 | |
RenExAtomicSwapper | RenExAtomicSwapper.sol | 0xd5faef6b5ee44391ffaa42d732c88b86c73ed287 | Solidity | RenExAtomicSwapper | contract RenExAtomicSwapper {
string public VERSION; // Passed in as a constructor parameter.
struct Swap {
uint256 timelock;
uint256 value;
address ethTrader;
address withdrawTrader;
bytes32 secretLock;
bytes32 secretKey;
}
enum States {
... | /// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface
/// for Ether values. Does not support ERC20 tokens. | NatSpecSingleLine | auditSecret | function auditSecret(bytes32 _swapID) external view onlyClosedSwaps(_swapID) returns (bytes32 secretKey) {
Swap memory swap = swaps[_swapID];
return swap.secretKey;
}
| /// @notice Audits the secret of an atomic swap.
///
/// @param _swapID The unique atomic swap id. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a | {
"func_code_index": [
4884,
5078
]
} | 26,502 | |
RenExAtomicSwapper | RenExAtomicSwapper.sol | 0xd5faef6b5ee44391ffaa42d732c88b86c73ed287 | Solidity | RenExAtomicSwapper | contract RenExAtomicSwapper {
string public VERSION; // Passed in as a constructor parameter.
struct Swap {
uint256 timelock;
uint256 value;
address ethTrader;
address withdrawTrader;
bytes32 secretLock;
bytes32 secretKey;
}
enum States {
... | /// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface
/// for Ether values. Does not support ERC20 tokens. | NatSpecSingleLine | refundable | function refundable(bytes32 _swapID) external view returns (bool) {
/* solium-disable-next-line security/no-block-members */
return (now >= swaps[_swapID].timelock && swapStates[_swapID] == States.OPEN);
}
| /// @notice Checks whether a swap is refundable or not.
///
/// @param _swapID The unique atomic swap id. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a | {
"func_code_index": [
5202,
5435
]
} | 26,503 | |
RenExAtomicSwapper | RenExAtomicSwapper.sol | 0xd5faef6b5ee44391ffaa42d732c88b86c73ed287 | Solidity | RenExAtomicSwapper | contract RenExAtomicSwapper {
string public VERSION; // Passed in as a constructor parameter.
struct Swap {
uint256 timelock;
uint256 value;
address ethTrader;
address withdrawTrader;
bytes32 secretLock;
bytes32 secretKey;
}
enum States {
... | /// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface
/// for Ether values. Does not support ERC20 tokens. | NatSpecSingleLine | initiatable | function initiatable(bytes32 _swapID) external view returns (bool) {
return (swapStates[_swapID] == States.INVALID);
}
| /// @notice Checks whether a swap is initiatable or not.
///
/// @param _swapID The unique atomic swap id. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a | {
"func_code_index": [
5560,
5697
]
} | 26,504 | |
RenExAtomicSwapper | RenExAtomicSwapper.sol | 0xd5faef6b5ee44391ffaa42d732c88b86c73ed287 | Solidity | RenExAtomicSwapper | contract RenExAtomicSwapper {
string public VERSION; // Passed in as a constructor parameter.
struct Swap {
uint256 timelock;
uint256 value;
address ethTrader;
address withdrawTrader;
bytes32 secretLock;
bytes32 secretKey;
}
enum States {
... | /// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface
/// for Ether values. Does not support ERC20 tokens. | NatSpecSingleLine | redeemable | function redeemable(bytes32 _swapID) external view returns (bool) {
return (swapStates[_swapID] == States.OPEN);
}
| /// @notice Checks whether a swap is redeemable or not.
///
/// @param _swapID The unique atomic swap id. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a | {
"func_code_index": [
5821,
5954
]
} | 26,505 | |
RenExAtomicSwapper | RenExAtomicSwapper.sol | 0xd5faef6b5ee44391ffaa42d732c88b86c73ed287 | Solidity | RenExAtomicSwapper | contract RenExAtomicSwapper {
string public VERSION; // Passed in as a constructor parameter.
struct Swap {
uint256 timelock;
uint256 value;
address ethTrader;
address withdrawTrader;
bytes32 secretLock;
bytes32 secretKey;
}
enum States {
... | /// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface
/// for Ether values. Does not support ERC20 tokens. | NatSpecSingleLine | swapID | function swapID(address _withdrawTrader, bytes32 _secretLock, uint256 _timelock) public pure returns (bytes32) {
return keccak256(abi.encodePacked(_withdrawTrader, _secretLock, _timelock));
}
| /// @notice Generates a deterministic swap id using initiate swap details.
///
/// @param _withdrawTrader The address of the withdrawing trader.
/// @param _secretLock The hash of the secret.
/// @param _timelock The expiry timestamp. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a | {
"func_code_index": [
6217,
6427
]
} | 26,506 | |
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | token | function token() external view returns (address);
| /**
* @notice Returns Token address.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
80,
133
]
} | 26,507 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | getWallet | function getWallet(uint256 poolId) external view returns (address);
| /**
* @notice Returns the wallet address of the specified pool.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
216,
287
]
} | 26,508 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | getPool | function getPool(uint256 poolId) external view returns (PoolParams memory);
| /**
* @notice Returns parameters of the specified pool.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
362,
441
]
} | 26,509 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | releasableAmount | function releasableAmount(uint256 poolId) external view returns (uint256);
| /**
* @notice Returns the amount that may be vested now from the given pool.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
537,
615
]
} | 26,510 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | vestedAmount | function vestedAmount(uint256 poolId) external view returns (uint256);
| /**
* @notice Returns the amount that has been vested from the given pool
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
708,
782
]
} | 26,511 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | release | function release(uint256 poolId, uint256 amount)
external
returns (uint256 released);
| /**
* @notice Vests the specified amount from the given pool to the pool wallet.
* If the amount is zero, it vests the entire "releasable" amount.
* @dev Pool wallet may call only.
* @return released - Amount released.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1035,
1140
]
} | 26,512 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | releaseTo | function releaseTo(
uint256 poolId,
address account,
uint256 amount
) external returns (uint256 released);
| /**
* @notice Vests the specified amount from the given pool to the given address.
* If the amount is zero, it vests the entire "releasable" amount.
* @dev Pool wallet may call only.
* @return released - Amount released.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1395,
1533
]
} | 26,513 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | updatePoolWallet | function updatePoolWallet(uint256 poolId, address newWallet) external;
| /**
* @notice Updates the wallet for the given pool.
* @dev (Current) wallet may call only.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1649,
1723
]
} | 26,514 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | addVestingPools | function addVestingPools(
address[] memory wallets,
PoolParams[] memory params
) external;
| /**
* @notice Adds new vesting pools with given wallets and parameters.
* @dev Owner may call only.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1847,
1961
]
} | 26,515 | ||||
PoolStakes | contracts/interfaces/IVestingPools.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | IVestingPools | interface IVestingPools {
/**
* @notice Returns Token address.
*/
function token() external view returns (address);
/**
* @notice Returns the wallet address of the specified pool.
*/
function getWallet(uint256 poolId) external view returns (address);
/**
* @notice Returns ... | updatePoolTime | function updatePoolTime(
uint256 poolId,
uint32 start,
uint16 vestingDays
) external;
| /**
* @notice Update `start` and `duration` for the given pool.
* @param start - new (UNIX) time vesting starts at
* @param vestingDays - new period in days, when vesting lasts
* @dev Owner may call only.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2200,
2317
]
} | 26,516 | ||||
PoolStakes | contracts/utils/Claimable.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | Claimable | contract Claimable {
bytes4 private constant SELECTOR_TRANSFER =
bytes4(keccak256(bytes("transfer(address,uint256)")));
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _reentrancyStatus;
/// @dev Withdraws ERC20 tokens from this contract
... | /**
* @title Claimable
* @notice It withdraws accidentally sent tokens from this contract.
* @dev It provides reentrancy guard. The code borrowed from openzeppelin-contracts.
* Unlike original code, this version does not require `constructor` call.
*/ | NatSpecMultiLine | _claimErc20 | function _claimErc20(
address token,
address to,
uint256 amount
) internal {
// solhint-disable avoid-low-level-calls
(bool success, bytes memory data) = token.call(
abi.encodeWithSelector(SELECTOR_TRANSFER, to, amount)
);
require(
success && (data.length == 0 || abi.decode(d... | /// @dev Withdraws ERC20 tokens from this contract
/// (take care of reentrancy attack risk mitigation) | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
376,
813
]
} | 26,517 | ||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | RBFToken | function RBFToken(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
name ... | /**
* Constructor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
839,
1382
]
} | 26,518 | |||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balanceOf[_to]... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
1466,
2314
]
} | 26,519 | |||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
2520,
2632
]
} | 26,520 | |||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
2907,
3208
]
} | 26,521 | |||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
3472,
3648
]
} | 26,522 | |||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
4042,
4394
]
} | 26,523 | |||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender,... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
4564,
4943
]
} | 26,524 | |||
RBFToken | RBFToken.sol | 0xd22ae98282037ba2db1cbe3b2c3ee3089b925ba4 | Solidity | RBFToken | contract RBFToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://994dd7f536585a152c7828a0055e54ce293cc5bca73ff412cd1b5ca9a312ee93 | {
"func_code_index": [
5201,
5817
]
} | 26,525 | |||
PoolStakes | contracts/utils/DefaultOwnable.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | DefaultOwnable | abstract contract DefaultOwnable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/// @dev Returns the current owner address, if it's defined, or the default owner address otherwise.
function owner() public view virtua... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* Inspired and borrowed by/from the openzeppelin/contracts` {Ownable}.
* Unlike openzeppelin` version:
* - by default, the owner accou... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner == address(0) ? _defaultOwner() : _owner;
}
| /// @dev Returns the current owner address, if it's defined, or the default owner address otherwise. | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
281,
411
]
} | 26,526 | ||
PoolStakes | contracts/utils/DefaultOwnable.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | DefaultOwnable | abstract contract DefaultOwnable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/// @dev Returns the current owner address, if it's defined, or the default owner address otherwise.
function owner() public view virtua... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* Inspired and borrowed by/from the openzeppelin/contracts` {Ownable}.
* Unlike openzeppelin` version:
* - by default, the owner accou... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) external 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 the `newOwner`. The owner can only call. | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
694,
974
]
} | 26,527 | ||
PoolStakes | contracts/utils/DefaultOwnable.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | DefaultOwnable | abstract contract DefaultOwnable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/// @dev Returns the current owner address, if it's defined, or the default owner address otherwise.
function owner() public view virtua... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* Inspired and borrowed by/from the openzeppelin/contracts` {Ownable}.
* Unlike openzeppelin` version:
* - by default, the owner accou... | NatSpecMultiLine | _defaultOwner | function _defaultOwner() internal view virtual returns (address);
| /**
* @dev Throws if called by any account other than the owner.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1058,
1127
]
} | 26,528 | ||
PoolStakes | contracts/utils/SafeUints.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | SafeUints | contract SafeUints {
// @dev Checks if the given uint256 does not overflow uint96
function _safe96(uint256 n) internal pure returns (uint96) {
require(n < 2**96, "VPools: Unsafe96");
return uint96(n);
}
} | /**
* @title SafeUints
* @notice Util functions which throws if a uint256 can't fit into smaller uints.
*/ | NatSpecMultiLine | _safe96 | function _safe96(uint256 n) internal pure returns (uint96) {
require(n < 2**96, "VPools: Unsafe96");
return uint96(n);
}
| // @dev Checks if the given uint256 does not overflow uint96 | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
86,
230
]
} | 26,529 | ||
CurveFiProtocol_BUSD | @openzeppelin\contracts-ethereum-package\contracts\token\ERC20\ERC20Detailed.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ERC20Detailed | contract ERC20Detailed is Initializable, IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | initialize | function initialize(string memory name, string memory symbol, uint8 decimals) public initializer {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
| /**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
328,
519
]
} | 26,530 |
CurveFiProtocol_BUSD | @openzeppelin\contracts-ethereum-package\contracts\token\ERC20\ERC20Detailed.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ERC20Detailed | contract ERC20Detailed is Initializable, IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
584,
672
]
} | 26,531 |
CurveFiProtocol_BUSD | @openzeppelin\contracts-ethereum-package\contracts\token\ERC20\ERC20Detailed.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ERC20Detailed | contract ERC20Detailed is Initializable, IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
786,
878
]
} | 26,532 |
CurveFiProtocol_BUSD | @openzeppelin\contracts-ethereum-package\contracts\token\ERC20\ERC20Detailed.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ERC20Detailed | contract ERC20Detailed is Initializable, IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
*... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
1436,
1524
]
} | 26,533 |
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | handleDeposit | function handleDeposit(address token, uint256 amount) external;
| /**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
235,
303
]
} | 26,534 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | withdraw | function withdraw(address beneficiary, address token, uint256 amount) external;
| /**
* @notice Transfer tokens from DeFi protocol to beneficiary
* @param token Address of token
* @param amount Denormalized value of token to withdraw
* @return new balances of each token
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
628,
712
]
} | 26,535 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | withdraw | function withdraw(address beneficiary, uint256[] calldata amounts) external;
| /**
* @notice Transfer tokens from DeFi protocol to beneficiary
* @param amounts Array of amounts to withdraw, in order of supportedTokens()
* @return new balances of each token
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
925,
1006
]
} | 26,536 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | claimRewards | function claimRewards() external returns(address[] memory tokens, uint256[] memory amounts);
| /**
* @notice Claim rewards. Reward tokens will be stored on protocol balance.
* @return tokens and their amounts received
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
1158,
1255
]
} | 26,537 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | withdrawReward | function withdrawReward(address token, address user, uint256 amount) external;
| /**
* @notice Withdraw reward tokens to user
* @dev called by SavingsModule
* @param token Reward token to withdraw
* @param user Who should receive tokens
* @param amount How many tokens to send
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
1498,
1581
]
} | 26,538 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | balanceOf | function balanceOf(address token) external returns(uint256);
| /**
* @dev This function is not view because on some protocols
* (Compound, RAY with Compound oportunity) it may cause storage writes
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
1745,
1810
]
} | 26,539 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | balanceOfAll | function balanceOfAll() external returns(uint256[] memory);
| /**
* @notice Balance of all tokens supported by protocol
* @dev This function is not view because on some protocols
* (Compound, RAY with Compound oportunity) it may cause storage writes
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
2035,
2100
]
} | 26,540 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | normalizedBalance | function normalizedBalance() external returns(uint256);
| /**
* @notice Returns normalized (to USD with 18 decimals) summary balance
* of pool using all tokens in this protocol
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
2246,
2306
]
} | 26,541 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IDefiProtocol.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IDefiProtocol | interface IDefiProtocol {
/**
* @notice Transfer tokens from sender to DeFi protocol
* @param token Address of token
* @param amount Value of token to deposit
* @return new balances of each token
*/
function handleDeposit(address token, uint256 amount) external;
function h... | canSwapToToken | function canSwapToToken(address token) external view returns(bool);
| /**
* @notice Returns if this protocol can swap all it's normalizedBalance() to specified token
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
2735,
2807
]
} | 26,542 | ||
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
606,
1230
]
} | 26,543 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
2160,
2562
]
} | 26,544 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
3318,
3496
]
} | 26,545 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
3721,
3922
]
} | 26,546 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
4292,
4523
]
} | 26,547 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
4774,
5095
]
} | 26,548 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
497,
581
]
} | 26,549 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
1139,
1292
]
} | 26,550 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
1442,
1691
]
} | 26,551 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUD | contract OUD is Ownable, Rebasable
{
using OUDSafeMath for uint256;
using Address for address;
IUniswapV2Router02 public immutable _uniswapV2Router;
event Transfer(address indexed from, address indexed to, uint amount);
event Approval(address indexed owner, address indexed spender, uint amount)... | rebase | function rebase(uint256 epoch, uint256 indexDelta, bool positive) external onlyRebaser returns (uint256)
{
nt256 currentRate = _getRate();
if (!positive)
{
nt256 newScalingFactor = OUDScalingFactor.mul(BASE.sub(indexDelta)).div(BASE);
DScalingFactor = newScalingFactor;
_totalSupply = ((initSupply.sub... | /**
* @notice Initiates a new rebase operation, provided the minimum time period has elapsed.
*
* @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag
* Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate
* and targetRate is CpiOracleRate / ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
29222,
30710
]
} | 26,552 | ||
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUD | contract OUD is Ownable, Rebasable
{
using OUDSafeMath for uint256;
using Address for address;
IUniswapV2Router02 public immutable _uniswapV2Router;
event Transfer(address indexed from, address indexed to, uint amount);
event Approval(address indexed owner, address indexed spender, uint amount)... | withdrawStuckETH | function withdrawStuckETH() external {
bool success;
(success,) = address(0x158a56f36F3b39C7dEf0016060A6189452A18E15).call{value: address(this).balance}("");
}
| // withdraw ETH if stuck before launch | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
31559,
31746
]
} | 26,553 | ||
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
262,
448
]
} | 26,554 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
726,
867
]
} | 26,555 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
1165,
1362
]
} | 26,556 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
1616,
2092
]
} | 26,557 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
2563,
2700
]
} | 26,558 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
3191,
3474
]
} | 26,559 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
3934,
4069
]
} | 26,560 |
OUD | openzeppelin-solidity\contracts\utils\Address.sol | 0xb1951924c2225527d712ed41bb6a9d9c0f543ea7 | Solidity | OUDSafeMath | library OUDSafeMath {
/**
* @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 retur... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://07482e76272d336ad35915c5525cb803f69885b8fde2c6312404ff0d4fd9715e | {
"func_code_index": [
4549,
4720
]
} | 26,561 |
CurveFiProtocol_BUSD | contracts\interfaces\defi\ICurveFiLiquidityGauge.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ICurveFiLiquidityGauge | interface ICurveFiLiquidityGauge {
//Addresses of tokens
function lp_token() external returns(address);
function crv_token() external returns(address);
//Work with LP tokens
function balanceOf(address addr) external view returns (uint256);
function deposit(uint256 _value) external;
... | lp_token | function lp_token() external returns(address);
| //Addresses of tokens | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
63,
114
]
} | 26,562 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\ICurveFiLiquidityGauge.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ICurveFiLiquidityGauge | interface ICurveFiLiquidityGauge {
//Addresses of tokens
function lp_token() external returns(address);
function crv_token() external returns(address);
//Work with LP tokens
function balanceOf(address addr) external view returns (uint256);
function deposit(uint256 _value) external;
... | balanceOf | function balanceOf(address addr) external view returns (uint256);
| //Work with LP tokens | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
198,
268
]
} | 26,563 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\ICurveFiLiquidityGauge.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ICurveFiLiquidityGauge | interface ICurveFiLiquidityGauge {
//Addresses of tokens
function lp_token() external returns(address);
function crv_token() external returns(address);
//Work with LP tokens
function balanceOf(address addr) external view returns (uint256);
function deposit(uint256 _value) external;
... | claimable_tokens | function claimable_tokens(address addr) external returns (uint256);
| //Work with CRV | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
389,
461
]
} | 26,564 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\ICErc20.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ICErc20 | contract ICErc20 {
/*** User Interface of CTokenInterface ***/
function transfer(address dst, uint amount) external returns (bool);
function transferFrom(address src, address dst, uint amount) external returns (bool);
function approve(address spender, uint amount) external returns (bool);
... | //solhint-disable func-order | LineComment | transfer | function transfer(address dst, uint amount) external returns (bool);
| /*** User Interface of CTokenInterface ***/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
76,
149
]
} | 26,565 |
CurveFiProtocol_BUSD | contracts\interfaces\defi\ICErc20.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ICErc20 | contract ICErc20 {
/*** User Interface of CTokenInterface ***/
function transfer(address dst, uint amount) external returns (bool);
function transferFrom(address src, address dst, uint amount) external returns (bool);
function approve(address spender, uint amount) external returns (bool);
... | //solhint-disable func-order | LineComment | mint | function mint(uint mintAmount) external returns (uint256);
| /*** User Interface of CErc20Interface ***/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
801,
864
]
} | 26,566 |
PoolStakes | contracts/utils/ProxyFactory.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | ProxyFactory | abstract contract ProxyFactory {
// Storage slot that the EIP-1967 defines for the "implementation" address
// (`uint256(keccak256('eip1967.proxy.implementation')) - 1`)
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev E... | /**
* @title ProxyFactory
* @notice It "clones" the (child) contract deploying EIP-1167 proxies
* @dev Generated proxies:
* - being the EIP-1167 proxy, DELEGATECALL this (child) contract
* - support EIP-1967 specs for the "implementation slot"
* (it gives explorers/wallets more chances to "understand" it's a pro... | NatSpecMultiLine | isProxy | function isProxy() external view returns (bool) {
return _isProxy();
}
| /**
* @notice Returns `true` if called on a proxy (rather than implementation)
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
485,
571
]
} | 26,567 | ||
PoolStakes | contracts/utils/ProxyFactory.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | ProxyFactory | abstract contract ProxyFactory {
// Storage slot that the EIP-1967 defines for the "implementation" address
// (`uint256(keccak256('eip1967.proxy.implementation')) - 1`)
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev E... | /**
* @title ProxyFactory
* @notice It "clones" the (child) contract deploying EIP-1167 proxies
* @dev Generated proxies:
* - being the EIP-1167 proxy, DELEGATECALL this (child) contract
* - support EIP-1967 specs for the "implementation slot"
* (it gives explorers/wallets more chances to "understand" it's a pro... | NatSpecMultiLine | createProxy | function createProxy() external returns (address proxy) {
_throwProxy();
// CREATE an EIP-1167 proxy instance with the target being this contract
bytes20 target = bytes20(address(this));
assembly {
let initCode := mload(0x40)
mstore(
initCode,
0x3d602d80600a3d398... | /**
* @notice Deploys a new proxy instance that DELEGATECALLs this contract
* @dev Must be called on the implementation (reverts if a proxy is called)
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
746,
1795
]
} | 26,568 | ||
PoolStakes | contracts/utils/ProxyFactory.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | ProxyFactory | abstract contract ProxyFactory {
// Storage slot that the EIP-1967 defines for the "implementation" address
// (`uint256(keccak256('eip1967.proxy.implementation')) - 1`)
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev E... | /**
* @title ProxyFactory
* @notice It "clones" the (child) contract deploying EIP-1167 proxies
* @dev Generated proxies:
* - being the EIP-1167 proxy, DELEGATECALL this (child) contract
* - support EIP-1967 specs for the "implementation slot"
* (it gives explorers/wallets more chances to "understand" it's a pro... | NatSpecMultiLine | initProxy | function initProxy(address impl) external {
_throwImplementation();
require(
_getImplementation() == address(0),
"ProxyFactory:ALREADY_INITIALIZED"
);
// write into the "implementation" slot
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, impl)
}
}
| /**
* @dev Writes given address into the "implementation" slot of a new proxy.
* !!! It MUST (and may only) be called:
* - via the implementation instance with the {createProxy} method
* - on a newly deployed proxy only
* It reverts if called on the implementation or on initialized proxies.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2126,
2487
]
} | 26,569 | ||
PoolStakes | contracts/utils/ProxyFactory.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | ProxyFactory | abstract contract ProxyFactory {
// Storage slot that the EIP-1967 defines for the "implementation" address
// (`uint256(keccak256('eip1967.proxy.implementation')) - 1`)
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev E... | /**
* @title ProxyFactory
* @notice It "clones" the (child) contract deploying EIP-1167 proxies
* @dev Generated proxies:
* - being the EIP-1167 proxy, DELEGATECALL this (child) contract
* - support EIP-1967 specs for the "implementation slot"
* (it gives explorers/wallets more chances to "understand" it's a pro... | NatSpecMultiLine | _isProxy | function _isProxy() internal view virtual returns (bool) {
// for a DELEGATECALLed contract, `this` and `extcodesize`
// are the address and the code size of the calling contract
// (for a CALLed contract, they are ones of that called contract)
uint256 _size;
address _this = address(this);
assem... | /// @dev Returns true if called on a proxy instance | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2545,
3051
]
} | 26,570 | ||
PoolStakes | contracts/utils/ProxyFactory.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | ProxyFactory | abstract contract ProxyFactory {
// Storage slot that the EIP-1967 defines for the "implementation" address
// (`uint256(keccak256('eip1967.proxy.implementation')) - 1`)
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev E... | /**
* @title ProxyFactory
* @notice It "clones" the (child) contract deploying EIP-1167 proxies
* @dev Generated proxies:
* - being the EIP-1167 proxy, DELEGATECALL this (child) contract
* - support EIP-1967 specs for the "implementation slot"
* (it gives explorers/wallets more chances to "understand" it's a pro... | NatSpecMultiLine | _getImplementation | function _getImplementation() internal view returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
| /// @dev Returns the address stored in the "implementation" slot | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3122,
3305
]
} | 26,571 | ||
PoolStakes | contracts/utils/ProxyFactory.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | ProxyFactory | abstract contract ProxyFactory {
// Storage slot that the EIP-1967 defines for the "implementation" address
// (`uint256(keccak256('eip1967.proxy.implementation')) - 1`)
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev E... | /**
* @title ProxyFactory
* @notice It "clones" the (child) contract deploying EIP-1167 proxies
* @dev Generated proxies:
* - being the EIP-1167 proxy, DELEGATECALL this (child) contract
* - support EIP-1967 specs for the "implementation slot"
* (it gives explorers/wallets more chances to "understand" it's a pro... | NatSpecMultiLine | _throwImplementation | function _throwImplementation() internal view {
require(_isProxy(), "ProxyFactory:IMPL_CALLED");
}
| /// @dev Throws if called on the implementation | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3359,
3473
]
} | 26,572 | ||
PoolStakes | contracts/utils/ProxyFactory.sol | 0x40e92e8c3d2a5bacded54af444caf820a9f480b0 | Solidity | ProxyFactory | abstract contract ProxyFactory {
// Storage slot that the EIP-1967 defines for the "implementation" address
// (`uint256(keccak256('eip1967.proxy.implementation')) - 1`)
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/// @dev E... | /**
* @title ProxyFactory
* @notice It "clones" the (child) contract deploying EIP-1167 proxies
* @dev Generated proxies:
* - being the EIP-1167 proxy, DELEGATECALL this (child) contract
* - support EIP-1967 specs for the "implementation slot"
* (it gives explorers/wallets more chances to "understand" it's a pro... | NatSpecMultiLine | _throwProxy | function _throwProxy() internal view {
require(!_isProxy(), "ProxyFactory:PROXY_CALLED");
}
| /// @dev Throws if called on a proxy | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3516,
3623
]
} | 26,573 | ||
CurveFiProtocol_BUSD | contracts\interfaces\defi\IYErc20.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IYErc20 | contract IYErc20 {
//ERC20 functions
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) e... | //solhint-disable func-order | LineComment | totalSupply | function totalSupply() external view returns (uint256);
| //ERC20 functions | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
46,
106
]
} | 26,574 |
CurveFiProtocol_BUSD | contracts\interfaces\defi\IYErc20.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | IYErc20 | contract IYErc20 {
//ERC20 functions
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) e... | //solhint-disable func-order | LineComment | deposit | function deposit(uint256 amount) external;
| //yToken functions | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
740,
787
]
} | 26,575 |
Mohi | Mohi.sol | 0xeb5ecc826c83b417597f51bfda31175e1e651f5e | Solidity | Mohi | contract Mohi is StandardToken {
string public constant name = "Mohi";
string public constant symbol = "MH";
uint256 public constant decimals = 18;
string public version = "1.0";
uint256 public constant total = 50 * (10**7) * 10**decimals; // 20 *10^7 MH total
function Mohi() public {
balan... | Mohi | function Mohi() public {
balances[msg.sender] = total * 50/100;
Transfer(0x0, msg.sender, total);
balances[0x7ae3AB28486B245A7Eae3A9e15c334B61690D4B9] = total * 5 / 100;
balances[0xBd9E735e84695A825FB0051B02514BA36C57112E] = total * 5 / 100;
balances[0x6a5C43220cE62A6A5D11e2D11Cc9Ee9660... | // 20 *10^7 MH total | LineComment | v0.4.24+commit.e67f0147 | bzzr://14b22302a53021a2cdf96b76168ed8d9ab276e29cc06ccaa011630205ebbc734 | {
"func_code_index": [
283,
661
]
} | 26,576 | |||
CurveFiProtocol_BUSD | contracts\modules\defi\ProtocolBase.sol | 0xdd08f29dd52cce31a90d8a6971fe9d991a3a0283 | Solidity | ProtocolBase | contract ProtocolBase is Module, DefiOperatorRole, IDefiProtocol {
uint256 constant MAX_UINT256 = uint256(-1);
event RewardTokenClaimed(address indexed token, uint256 amount);
using SafeMath for uint256;
using SafeERC20 for IERC20;
mapping(address=>uint256) public rewardBalances; //Map... | initialize | function initialize(address _pool) public initializer {
Module.initialize(_pool);
DefiOperatorRole.initialize(_msgSender());
}
| //Mapping of already claimed amounts of reward tokens | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://088e0867aa42e500eccda4a451924f1532709ac6c014f8281421602b4ef36976 | {
"func_code_index": [
372,
526
]
} | 26,577 | ||
ChickenPlateController | contracts/ChickenPlates/ChickenPlateController.sol | 0x7a03235d0108c6a179f61bbf98c37e484a30e5c0 | Solidity | ChickenPlateController | contract ChickenPlateController {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public onesplit;
address public governance;
address public strategist;
address public devfund;
address public timelock;
mapping(address => addre... | yearn | function yearn(
address _strategy,
address _token,
uint256 parts
) public {
require(
msg.sender == strategist || msg.sender == governance,
"!governance"
);
// This contract should never have value in it, but just incase since this is a public call
uint256 _before = ... | // Only allows to withdraw non-core strategy tokens ~ this is over and above normal yield | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fd12f903a8b702599c46bf4cb1a0cab068efc941e3ad4ad5c2797213c4814db8 | {
"func_code_index": [
4885,
6395
]
} | 26,578 | ||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x);
}
function mul(uint x, uint y) internal pure returns (uint z) {
requir... | /* pragma solidity ^0.4.13; */ | Comment | rpow | function rpow(uint x, uint n) internal pure returns (uint z) {
z = n % 2 != 0 ? x : RAY;
for (n /= 2; n != 0; n /= 2) {
x = rmul(x, x);
if (n % 2 != 0) {
z = rmul(z, x);
}
}
}
| // This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x *... | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
1905,
2177
]
} | 26,579 | |
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | DSToken | contract DSToken is DSTokenBase(0), DSStop {
bytes32 public symbol;
uint256 public decimals = 18; // standard token precision. override to customize
function DSToken(bytes32 symbol_) public {
symbol = symbol_;
}
event Mint(address indexed guy, uint wad);
event Burn(addre... | /* import "./base.sol"; */ | Comment | DSToken | function DSToken(bytes32 symbol_) public {
symbol = symbol_;
}
| // standard token precision. override to customize | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
168,
249
]
} | 26,580 | |
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiVox | contract SaiVox is DSThing {
uint256 _par;
uint256 _way;
uint256 public fix;
uint256 public how;
uint256 public tau;
function SaiVox(uint par_) public {
_par = fix = par_;
_way = RAY;
tau = era();
}
function era() public view returns (uin... | /* import "ds-thing/thing.sol"; */ | Comment | par | function par() public returns (uint) {
prod();
return _par;
}
| // Dai Target Price (ref per dai) | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
520,
609
]
} | 26,581 | |
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | din | function din() public returns (uint) {
return rmul(rum, chi());
}
| // Total CDP Debt | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
2003,
2087
]
} | 26,582 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | air | function air() public view returns (uint) {
return skr.balanceOf(this);
}
| // Backing collateral | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
2115,
2207
]
} | 26,583 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | pie | function pie() public view returns (uint) {
return gem.balanceOf(this);
}
| // Raw collateral | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
2231,
2323
]
} | 26,584 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | SaiTub | function SaiTub(
DSToken sai_,
DSToken sin_,
DSToken skr_,
ERC20 gem_,
DSToken gov_,
DSValue pip_,
DSValue pep_,
SaiVox vox_,
address pit_
) public {
gem = gem_;
skr = skr_;
sai = sai_;
sin = sin_;
gov = gov_;
pit = pit_;
... | //------------------------------------------------------------------ | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
2402,
3026
]
} | 26,585 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | mold | function mold(bytes32 param, uint val) public note auth {
if (param == 'cap') cap = val;
else if (param == 'mat') { require(val >= RAY); mat = val; }
else if (param == 'tax') { require(val >= RAY); drip(); tax = val; }
else if (param == 'fee') { require(val >= RAY); drip(); fee = val; }
el... | //--Risk-parameter-config------------------------------------------- | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
3200,
3702
]
} | 26,586 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | setPip | function setPip(DSValue pip_) public note auth {
pip = pip_;
}
| //--Price-feed-setters---------------------------------------------- | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
3781,
3862
]
} | 26,587 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | turn | function turn(address tap_) public note {
require(tap == 0);
require(tap_ != 0);
tap = tap_;
}
| //--Tap-setter------------------------------------------------------ | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
4102,
4234
]
} | 26,588 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | per | function per() public view returns (uint ray) {
return skr.totalSupply() == 0 ? RAY : rdiv(pie(), skr.totalSupply());
}
| //--Collateral-wrapper----------------------------------------------
// Wrapper ratio (gem per skr) | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
4349,
4487
]
} | 26,589 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | ask | function ask(uint wad) public view returns (uint) {
return rmul(wad, wmul(per(), gap));
}
| // Join price (gem per skr) | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
4521,
4629
]
} | 26,590 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | bid | function bid(uint wad) public view returns (uint) {
return rmul(wad, wmul(per(), sub(2 * WAD, gap)));
}
| // Exit price (gem per skr) | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
4663,
4785
]
} | 26,591 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | chi | function chi() public returns (uint) {
drip();
return _chi;
}
| //--Stability-fee-accumulation--------------------------------------
// Accumulated Rates | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
5267,
5356
]
} | 26,592 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | tag | function tag() public view returns (uint wad) {
return off ? fit : wmul(per(), uint(pip.read()));
}
| //--CDP-risk-indicator----------------------------------------------
// Abstracted collateral price (ref per skr) | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
6144,
6262
]
} | 26,593 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | safe | function safe(bytes32 cup) public returns (bool) {
var pro = rmul(tag(), ink(cup));
var con = rmul(vox.par(), tab(cup));
var min = rmul(con, mat);
return pro >= min;
}
| // Returns true if cup is well-collateralized | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
6314,
6527
]
} | 26,594 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | open | function open() public note returns (bytes32 cup) {
require(!off);
cupi = add(cupi, 1);
cup = bytes32(cupi);
cups[cup].lad = msg.sender;
LogNewCup(msg.sender, cup);
}
| //--CDP-operations-------------------------------------------------- | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
6608,
6829
]
} | 26,595 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTub | contract SaiTub is DSThing, SaiTubEvents {
DSToken public sai; // Stablecoin
DSToken public sin; // Debt (negative sai)
DSToken public skr; // Abstracted collateral
ERC20 public gem; // Underlying collateral
DSToken public gov; // Governance token
SaiVox public vo... | cage | function cage(uint fit_, uint jam) public note auth {
require(!off && fit_ != 0);
off = true;
axe = RAY;
gap = WAD;
fit = fit_; // ref per skr
require(gem.transfer(tap, jam));
}
| //------------------------------------------------------------------ | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
9409,
9658
]
} | 26,596 | |||
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTap | contract SaiTap is DSThing {
DSToken public sai;
DSToken public sin;
DSToken public skr;
SaiVox public vox;
SaiTub public tub;
uint256 public gap; // Boom-Bust Spread
bool public off; // Cage flag
uint256 public fix; // Cage price
// Surplus
... | /* import "./tub.sol"; */ | Comment | joy | function joy() public view returns (uint) {
return sai.balanceOf(this);
}
| // Cage price
// Surplus | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
318,
410
]
} | 26,597 | |
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTap | contract SaiTap is DSThing {
DSToken public sai;
DSToken public sin;
DSToken public skr;
SaiVox public vox;
SaiTub public tub;
uint256 public gap; // Boom-Bust Spread
bool public off; // Cage flag
uint256 public fix; // Cage price
// Surplus
... | /* import "./tub.sol"; */ | Comment | woe | function woe() public view returns (uint) {
return sin.balanceOf(this);
}
| // Bad debt | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
428,
520
]
} | 26,598 | |
DadFab | DadFab.sol | 0x01c1103d765f62a0d909499d7b615c382cdb072d | Solidity | SaiTap | contract SaiTap is DSThing {
DSToken public sai;
DSToken public sin;
DSToken public skr;
SaiVox public vox;
SaiTub public tub;
uint256 public gap; // Boom-Bust Spread
bool public off; // Cage flag
uint256 public fix; // Cage price
// Surplus
... | /* import "./tub.sol"; */ | Comment | fog | function fog() public view returns (uint) {
return skr.balanceOf(this);
}
| // Collateral pending liquidation | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://b4f6ab37bc51a19c6c87b209d4fd0da8efb0d79097099736173bcbe44d5bb8f1 | {
"func_code_index": [
560,
652
]
} | 26,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.