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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
InfinityClaim | InfinityClaim.sol | 0x483dae820adfa46dd9fa96801d15ec1528d997ec | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://d899e18ee52102a5791c4659e77ac551a3a56250258fd577e71c395c53dae418 | {
"func_code_index": [
3999,
4134
]
} | 20,500 |
InfinityClaim | InfinityClaim.sol | 0x483dae820adfa46dd9fa96801d15ec1528d997ec | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://d899e18ee52102a5791c4659e77ac551a3a56250258fd577e71c395c53dae418 | {
"func_code_index": [
4614,
4819
]
} | 20,501 |
InfinityClaim | InfinityClaim.sol | 0x483dae820adfa46dd9fa96801d15ec1528d997ec | Solidity | Ownable | contract Ownable{
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial ow... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://d899e18ee52102a5791c4659e77ac551a3a56250258fd577e71c395c53dae418 | {
"func_code_index": [
567,
651
]
} | 20,502 | ||
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | setGuardian | function setGuardian(address _guardian) external onlyOwner {
require(
_guardian != address(0),
"Orchestrator::setGuardian: guardian can't be zero"
);
guardian = _guardian;
emit GuardianSet(msg.sender, _guardian);
}
| /**
* @notice Sets the guardian of the orchestrator
* @param _guardian address of the guardian
* @dev Only owner can call it
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
2496,
2742
]
} | 20,503 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | setRatio | function setRatio(IVaultHandler _vault, uint256 _ratio)
external
onlyOwner
validVault(_vault)
{
_vault.setRatio(_ratio);
}
| /**
* @notice Sets the ratio of a vault
* @param _vault address
* @param _ratio value
* @dev Only owner can call it
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
2880,
3024
]
} | 20,504 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | setBurnFee | function setBurnFee(IVaultHandler _vault, uint256 _burnFee)
external
onlyOwner
validVault(_vault)
{
_vault.setBurnFee(_burnFee);
}
| /**
* @notice Sets the burn fee of a vault
* @param _vault address
* @param _burnFee value
* @dev Only owner can call it
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
3167,
3319
]
} | 20,505 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | setEmergencyBurnFee | function setEmergencyBurnFee(IVaultHandler _vault)
external
onlyGuardian
validVault(_vault)
{
require(
emergencyCalled[_vault][Functions.BURNFEE] != true,
"Orchestrator::setEmergencyBurnFee: emergency call already used"
);
emergencyCalled[_vault][Functions.BURNFEE] = true;
_vault.setBurnFee(0);
}
| /**
* @notice Sets the burn fee to 0, only used on a black swan event
* @param _vault address
* @dev Only guardian can call it
* @dev Validates if _vault is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
3504,
3847
]
} | 20,506 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | setLiquidationPenalty | function setLiquidationPenalty(
IVaultHandler _vault,
uint256 _liquidationPenalty
) external onlyOwner validVault(_vault) {
_vault.setLiquidationPenalty(_liquidationPenalty);
}
| /**
* @notice Sets the liquidation penalty of a vault
* @param _vault address
* @param _liquidationPenalty value
* @dev Only owner can call it
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
4012,
4206
]
} | 20,507 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | setEmergencyLiquidationPenalty | function setEmergencyLiquidationPenalty(IVaultHandler _vault)
external
onlyGuardian
validVault(_vault)
{
require(
emergencyCalled[_vault][Functions.LIQUIDATION] != true,
"Orchestrator::setEmergencyLiquidationPenalty: emergency call already used"
);
emergencyCalled[_vault][Functions.LIQUIDATION] = tr... | /**
* @notice Sets the liquidation penalty of a vault to 0, only used on a black swan event
* @param _vault address
* @dev Only guardian can call it
* @dev Validates if _vault is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
4413,
4797
]
} | 20,508 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | pauseVault | function pauseVault(IVaultHandler _vault)
external
onlyGuardian
validVault(_vault)
{
require(
emergencyCalled[_vault][Functions.PAUSE] != true,
"Orchestrator::pauseVault: emergency call already used"
);
emergencyCalled[_vault][Functions.PAUSE] = true;
_vault.pause();
}
| /**
* @notice Pauses the Vault
* @param _vault address
* @dev Only guardian can call it
* @dev Validates if _vault is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
4943,
5258
]
} | 20,509 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | unpauseVault | function unpauseVault(IVaultHandler _vault)
external
onlyGuardian
validVault(_vault)
{
_vault.unpause();
}
| /**
* @notice Unpauses the Vault
* @param _vault address
* @dev Only guardian can call it
* @dev Validates if _vault is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
5406,
5534
]
} | 20,510 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | enableTCAPCap | function enableTCAPCap(TCAP _tcap, bool _enable)
external
onlyOwner
validTCAP(_tcap)
{
_tcap.enableCap(_enable);
}
| /**
* @notice Enables or disables the TCAP Cap
* @param _tcap address
* @param _enable bool
* @dev Only owner can call it
* @dev Validates if _tcap is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
5716,
5852
]
} | 20,511 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | setTCAPCap | function setTCAPCap(TCAP _tcap, uint256 _cap)
external
onlyOwner
validTCAP(_tcap)
{
_tcap.setCap(_cap);
}
| /**
* @notice Sets the TCAP maximum minting value
* @param _tcap address
* @param _cap uint value
* @dev Only owner can call it
* @dev Validates if _tcap is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
6040,
6167
]
} | 20,512 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | addTCAPVault | function addTCAPVault(TCAP _tcap, IVaultHandler _vault)
external
onlyOwner
validTCAP(_tcap)
validVault(_vault)
{
_tcap.addVaultHandler(address(_vault));
}
| /**
* @notice Adds Vault to TCAP ERC20
* @param _tcap address
* @param _vault address
* @dev Only owner can call it
* @dev Validates if _tcap is valid
* @dev Validates if _vault is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
6382,
6562
]
} | 20,513 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | removeTCAPVault | function removeTCAPVault(TCAP _tcap, IVaultHandler _vault)
external
onlyOwner
validTCAP(_tcap)
validVault(_vault)
{
_tcap.removeVaultHandler(address(_vault));
}
| /**
* @notice Removes Vault to TCAP ERC20
* @param _tcap address
* @param _vault address
* @dev Only owner can call it
* @dev Validates if _tcap is valid
* @dev Validates if _vault is valid
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
6780,
6966
]
} | 20,514 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | executeTransaction | function executeTransaction(
address target,
uint256 value,
string memory signature,
bytes memory data
) external payable onlyOwner returns (bytes memory) {
bytes memory callData;
if (bytes(signature).length == 0) {
callData = data;
} else {
callData = abi.encodePacked(bytes4(keccak256(bytes(signa... | /**
* @notice Allows the owner to execute custom transactions
* @param target address
* @param value uint256
* @param signature string
* @param data bytes
* @dev Only owner can call it
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
7179,
8037
]
} | 20,515 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | retrieveETH | function retrieveETH(address _to) external onlyOwner {
require(
_to != address(0),
"Orchestrator::retrieveETH: address can't be zero"
);
uint256 amount = address(this).balance;
payable(_to).transfer(amount);
}
| /**
* @notice Retrieves the eth stuck on the orchestrator
* @param _to address
* @dev Only owner can call it
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
8165,
8406
]
} | 20,516 | |
ERC20VaultHandler | contracts/Orchestrator.sol | 0x56549e2fe1d9f0a9556f92494d04f263a5011a00 | Solidity | Orchestrator | contract Orchestrator is Ownable {
/// @dev Enum which saves the available functions to emergency call.
enum Functions {BURNFEE, LIQUIDATION, PAUSE}
/// @notice Address that can set to 0 the fees or pause the vaults in an emergency event
address public guardian;
/** @dev Interface constants*/
bytes4 priva... | /**
* @title TCAP Orchestrator
* @author Cryptex.finance
* @notice Orchestrator contract in charge of managing the settings of the vaults, rewards and TCAP token. It acts as the owner of these contracts.
*/ | NatSpecMultiLine | /// @notice Allows the contract to receive ETH | NatSpecSingleLine | v0.7.5+commit.eb77ed08 | MIT | {
"func_code_index": [
8457,
8488
]
} | 20,517 | |||
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | quorumVotes | function quorumVotes() public view virtual returns (uint256);
| /**
* @dev Part of the Governor Bravo's interface.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
919,
984
]
} | 20,518 | |
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | proposals | function proposals(uint256)
public
view
virtual
returns (
uint256 id,
address proposer,
uint256 eta,
uint256 startBlock,
uint256 endBlock,
uint256 forVotes,
uint256 againstVotes,
uint256 abstainVotes,
bool canceled,
bool exe... | /**
* @dev Part of the Governor Bravo's interface: _"The official record of all proposals ever proposed"_.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1110,
1506
]
} | 20,519 | |
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | propose | function propose(
address[] memory targets,
uint256[] memory values,
string[] memory signatures,
bytes[] memory calldatas,
string memory description
) public virtual returns (uint256);
| /**
* @dev Part of the Governor Bravo's interface: _"Function used to propose a new proposal"_.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1621,
1853
]
} | 20,520 | |
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | queue | function queue(uint256 proposalId) public virtual;
| /**
* @dev Part of the Governor Bravo's interface: _"Queues a proposal of state succeeded"_.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1965,
2019
]
} | 20,521 | |
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | execute | function execute(uint256 proposalId) public payable virtual;
| /**
* @dev Part of the Governor Bravo's interface: _"Executes a queued proposal if eta has passed"_.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2139,
2203
]
} | 20,522 | |
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | cancel | function cancel(uint256 proposalId) public virtual;
| /**
* @dev Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2340,
2395
]
} | 20,523 | |
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | getActions | function getActions(uint256 proposalId)
public
view
virtual
returns (
address[] memory targets,
uint256[] memory values,
string[] memory signatures,
bytes[] memory calldatas
);
| /**
* @dev Part of the Governor Bravo's interface: _"Gets actions of a proposal"_.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2497,
2765
]
} | 20,524 | |
UnionGovernor | @openzeppelin/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernorCompatibilityBravo | abstract contract IGovernorCompatibilityBravo is IGovernor {
/**
* @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
* {{proposal}} returns a very different structure.
*/
struct Proposal {
uint256 id;
address proposer;
u... | /**
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | getReceipt | function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory);
| /**
* @dev Part of the Governor Bravo's interface: _"Gets the receipt for a voter on a given proposal"_.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2889,
2993
]
} | 20,525 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | name | function name() public view virtual returns (string memory);
| /**
* @notice module:core
* @dev Name of the governor instance (used in building the ERC712 domain separator).
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1202,
1266
]
} | 20,526 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | version | function version() public view virtual returns (string memory);
| /**
* @notice module:core
* @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1"
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1417,
1484
]
} | 20,527 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | COUNTING_MODE | function COUNTING_MODE() public pure virtual returns (string memory);
| // solhint-disable-next-line func-name-mixedcase | LineComment | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2462,
2535
]
} | 20,528 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | hashProposal | function hashProposal(
address[] calldata targets,
uint256[] calldata values,
bytes[] calldata calldatas,
bytes32 descriptionHash
) public pure virtual returns (uint256);
| /**
* @notice module:core
* @dev Hashing function used to (re)build the proposal id from the proposal details..
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2671,
2881
]
} | 20,529 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | state | function state(uint256 proposalId) public view virtual returns (ProposalState);
| /**
* @notice module:core
* @dev Current state of a proposal, following Compound's convention
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2999,
3082
]
} | 20,530 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | proposalSnapshot | function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256);
| /**
* @notice module:core
* @dev Block number used to retrieve user's votes and quorum. As per Compound's Comp and OpenZeppelin's
* ERC20Votes, the snapshot is performed at the end of this block. Hence, voting for this proposal starts at the
* beginning of the following block.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
3394,
3482
]
} | 20,531 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | proposalDeadline | function proposalDeadline(uint256 proposalId) public view virtual returns (uint256);
| /**
* @notice module:core
* @dev Block number at which votes close. Votes close at the end of this block, so it is possible to cast a vote
* during this block.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
3671,
3759
]
} | 20,532 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | votingDelay | function votingDelay() public view virtual returns (uint256);
| /**
* @notice module:user-config
* @dev Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to
* leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
4034,
4099
]
} | 20,533 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | votingPeriod | function votingPeriod() public view virtual returns (uint256);
| /**
* @notice module:user-config
* @dev Delay, in number of blocks, between the vote start and vote ends.
*
* NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting
* duration compared to the voting delay.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
4394,
4460
]
} | 20,534 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | quorum | function quorum(uint256 blockNumber) public view virtual returns (uint256);
| /**
* @notice module:user-config
* @dev Minimum number of cast voted required for a proposal to be successful.
*
* Note: The `blockNumber` parameter corresponds to the snaphot used for counting vote. This allows to scale the
* quroum depending on values such as the totalSupply of a token at this block (see {ERC20V... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
4822,
4901
]
} | 20,535 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | getVotes | function getVotes(address account, uint256 blockNumber) public view virtual returns (uint256);
| /**
* @notice module:reputation
* @dev Voting power of an `account` at a specific `blockNumber`.
*
* Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or
* multiple), {ERC20Votes} tokens.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
5184,
5282
]
} | 20,536 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | hasVoted | function hasVoted(uint256 proposalId, address account) public view virtual returns (bool);
| /**
* @notice module:voting
* @dev Returns weither `account` has cast a vote on `proposalId`.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
5400,
5494
]
} | 20,537 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | propose | function propose(
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
string memory description
) public virtual returns (uint256 proposalId);
| /**
* @dev Create a new proposal. Vote start {IGovernor-votingDelay} blocks after the proposal is created and ends
* {IGovernor-votingPeriod} blocks after the voting starts.
*
* Emits a {ProposalCreated} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
5739,
5946
]
} | 20,538 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | execute | function execute(
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
bytes32 descriptionHash
) public payable virtual returns (uint256 proposalId);
| /**
* @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the
* deadline to be reached.
*
* Emits a {ProposalExecuted} event.
*
* Note: some module can modify the requirements for execution, for example by adding an additional timelock.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
6282,
6495
]
} | 20,539 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | castVote | function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance);
| /**
* @dev Cast a vote
*
* Emits a {VoteCast} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
6577,
6675
]
} | 20,540 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | castVoteWithReason | function castVoteWithReason(
uint256 proposalId,
uint8 support,
string calldata reason
) public virtual returns (uint256 balance);
| /**
* @dev Cast a with a reason
*
* Emits a {VoteCast} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
6766,
6928
]
} | 20,541 | |
UnionGovernor | @openzeppelin/contracts/governance/IGovernor.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | IGovernor | abstract contract IGovernor is IERC165 {
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 pr... | /**
* @dev Interface of the {Governor} core.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | castVoteBySig | function castVoteBySig(
uint256 proposalId,
uint8 support,
uint8 v,
bytes32 r,
bytes32 s
) public virtual returns (uint256 balance);
| /**
* @dev Cast a vote using the user cryptographic signature.
*
* Emits a {VoteCast} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
7050,
7230
]
} | 20,542 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorVotesComp.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorVotesComp | abstract contract GovernorVotesComp is Governor {
ERC20VotesComp public immutable token;
constructor(ERC20VotesComp token_) {
token = token_;
}
/**
* Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}).
*/
function getVotes(address accou... | /**
* @dev Extension of {Governor} for voting weight extraction from a Comp token.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | getVotes | function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {
return token.getPriorVotes(account, blockNumber);
}
| /**
* Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}).
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
285,
457
]
} | 20,543 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | votingDelay | function votingDelay() public view virtual override returns (uint256) {
return _votingDelay;
}
| /**
* @dev See {IGovernor-votingDelay}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
821,
931
]
} | 20,544 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | votingPeriod | function votingPeriod() public view virtual override returns (uint256) {
return _votingPeriod;
}
| /**
* @dev See {IGovernor-votingPeriod}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
991,
1103
]
} | 20,545 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | proposalThreshold | function proposalThreshold() public view virtual override returns (uint256) {
return _proposalThreshold;
}
| /**
* @dev See {Governor-proposalThreshold}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1167,
1289
]
} | 20,546 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | setVotingDelay | function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance {
_setVotingDelay(newVotingDelay);
}
| /**
* @dev Update the voting delay. This operation can only be performed through a governance proposal.
*
* Emits a {VotingDelaySet} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1458,
1588
]
} | 20,547 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | setVotingPeriod | function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance {
_setVotingPeriod(newVotingPeriod);
}
| /**
* @dev Update the voting period. This operation can only be performed through a governance proposal.
*
* Emits a {VotingPeriodSet} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
1759,
1893
]
} | 20,548 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | setProposalThreshold | function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance {
_setProposalThreshold(newProposalThreshold);
}
| /**
* @dev Update the proposal threshold. This operation can only be performed through a governance proposal.
*
* Emits a {ProposalThresholdSet} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2074,
2228
]
} | 20,549 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | _setVotingDelay | function _setVotingDelay(uint256 newVotingDelay) internal virtual {
emit VotingDelaySet(_votingDelay, newVotingDelay);
_votingDelay = newVotingDelay;
}
| /**
* @dev Internal setter for the voting delay.
*
* Emits a {VotingDelaySet} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2342,
2517
]
} | 20,550 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | _setVotingPeriod | function _setVotingPeriod(uint256 newVotingPeriod) internal virtual {
// voting period must be at least one block long
require(newVotingPeriod > 0, "GovernorSettings: voting period too low");
emit VotingPeriodSet(_votingPeriod, newVotingPeriod);
_votingPeriod = newVotingPeriod;
}
| /**
* @dev Internal setter for the voting period.
*
* Emits a {VotingPeriodSet} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
2633,
2953
]
} | 20,551 | |
UnionGovernor | @openzeppelin/contracts/governance/extensions/GovernorSettings.sol | 0xe1b3f07a9032f0d3dedf3e96c395a4da74130f6e | Solidity | GovernorSettings | abstract contract GovernorSettings is Governor {
uint256 private _votingDelay;
uint256 private _votingPeriod;
uint256 private _proposalThreshold;
event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
event ... | /**
* @dev Extension of {Governor} for settings updatable through governance.
*
* _Available since v4.4._
*/ | NatSpecMultiLine | _setProposalThreshold | function _setProposalThreshold(uint256 newProposalThreshold) internal virtual {
emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold);
_proposalThreshold = newProposalThreshold;
}
| /**
* @dev Internal setter for the proposal threshold.
*
* Emits a {ProposalThresholdSet} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
3079,
3296
]
} | 20,552 | |
KeeperIncentive | contracts/core/utils/KeeperIncentive.sol | 0xcd4f7582b32d90bd9fc7dc9f8116c43ab17de011 | Solidity | KeeperIncentive | contract KeeperIncentive {
using SafeERC20 for IERC20;
struct Incentive {
uint256 reward; //pop reward for calling the function
bool enabled;
bool openToEveryone; //can everyone call the function to get the reward or only approved?
}
/* ========== STATE VARIABLES ========== */
IContractRegistry... | handleKeeperIncentive | function handleKeeperIncentive(
bytes32 _contractName,
uint8 _i,
address _keeper
) external {
require(msg.sender == controllerContracts[_contractName], "Can only be called by the controlling contract");
Incentive memory incentive = incentives[_contractName][_i];
if (!incentive.openToEveryone) {
IACLRe... | /* ========== MUTATIVE FUNCTIONS ========== */ | Comment | v0.8.0+commit.c7dfd78e | GNU GPLv3 | {
"func_code_index": [
1725,
2768
]
} | 20,553 | |||
KeeperIncentive | contracts/core/utils/KeeperIncentive.sol | 0xcd4f7582b32d90bd9fc7dc9f8116c43ab17de011 | Solidity | KeeperIncentive | contract KeeperIncentive {
using SafeERC20 for IERC20;
struct Incentive {
uint256 reward; //pop reward for calling the function
bool enabled;
bool openToEveryone; //can everyone call the function to get the reward or only approved?
}
/* ========== STATE VARIABLES ========== */
IContractRegistry... | createIncentive | function createIncentive(
bytes32 _contractName,
uint256 _reward,
bool _enabled,
bool _openToEveryone
) public {
IACLRegistry(contractRegistry.getContract(keccak256("ACLRegistry"))).requireRole(keccak256("DAO"), msg.sender);
incentives[_contractName].push(Incentive({reward: _reward, enabled: _enabled, openT... | /**
* @notice Create Incentives for keeper to call a function
* @param _contractName Name of contract that uses ParticipationRewards in bytes32
* @param _reward The amount in POP the Keeper receives for calling the function
* @param _enabled Is this Incentive currently enabled?
* @param _openToEveryone Can anyone ... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | GNU GPLv3 | {
"func_code_index": [
3383,
3821
]
} | 20,554 | |||
KeeperIncentive | contracts/core/utils/KeeperIncentive.sol | 0xcd4f7582b32d90bd9fc7dc9f8116c43ab17de011 | Solidity | KeeperIncentive | contract KeeperIncentive {
using SafeERC20 for IERC20;
struct Incentive {
uint256 reward; //pop reward for calling the function
bool enabled;
bool openToEveryone; //can everyone call the function to get the reward or only approved?
}
/* ========== STATE VARIABLES ========== */
IContractRegistry... | updateIncentive | function updateIncentive(
bytes32 _contractName,
uint8 _i,
uint256 _reward,
bool _enabled,
bool _openToEveryone
) external {
IACLRegistry(contractRegistry.getContract(keccak256("ACLRegistry"))).requireRole(keccak256("DAO"), msg.sender);
Incentive storage incentive = incentives[_contractName][_i];
uint25... | /* ========== RESTRICTED FUNCTIONS ========== */ | Comment | v0.8.0+commit.c7dfd78e | GNU GPLv3 | {
"func_code_index": [
3875,
4517
]
} | 20,555 | |||
KeeperIncentive | contracts/core/utils/KeeperIncentive.sol | 0xcd4f7582b32d90bd9fc7dc9f8116c43ab17de011 | Solidity | KeeperIncentive | contract KeeperIncentive {
using SafeERC20 for IERC20;
struct Incentive {
uint256 reward; //pop reward for calling the function
bool enabled;
bool openToEveryone; //can everyone call the function to get the reward or only approved?
}
/* ========== STATE VARIABLES ========== */
IContractRegistry... | addControllerContract | function addControllerContract(bytes32 _contractName, address contract_) external {
IACLRegistry(contractRegistry.getContract(keccak256("ACLRegistry"))).requireRole(keccak256("DAO"), msg.sender);
controllerContracts[_contractName] = contract_;
emit ControllerContractAdded(_contractName, contract_);
}
| /**
* @notice In order to allow a contract to use ParticipationReward they need to be added as a controller contract
* @param _contractName the name of the controller contract in bytes32
* @param contract_ the address of the controller contract
* @dev all critical functions to init/open vaults and add shares to the... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | GNU GPLv3 | {
"func_code_index": [
5898,
6215
]
} | 20,556 | |||
KeeperIncentive | contracts/core/utils/KeeperIncentive.sol | 0xcd4f7582b32d90bd9fc7dc9f8116c43ab17de011 | Solidity | KeeperIncentive | contract KeeperIncentive {
using SafeERC20 for IERC20;
struct Incentive {
uint256 reward; //pop reward for calling the function
bool enabled;
bool openToEveryone; //can everyone call the function to get the reward or only approved?
}
/* ========== STATE VARIABLES ========== */
IContractRegistry... | updateBurnRate | function updateBurnRate(uint256 _burnRate) external {
IACLRegistry(contractRegistry.getContract(keccak256("ACLRegistry"))).requireRole(keccak256("DAO"), msg.sender);
emit BurnRateChanged(burnRate, _burnRate);
burnRate = _burnRate;
}
| /**
* @notice Sets the current burn rate as a percentage of the incentive reward.
* @param _burnRate Percentage in Mantissa. (1e14 = 1 Basis Point)
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | GNU GPLv3 | {
"func_code_index": [
6379,
6627
]
} | 20,557 | |||
KeeperIncentive | contracts/core/utils/KeeperIncentive.sol | 0xcd4f7582b32d90bd9fc7dc9f8116c43ab17de011 | Solidity | KeeperIncentive | contract KeeperIncentive {
using SafeERC20 for IERC20;
struct Incentive {
uint256 reward; //pop reward for calling the function
bool enabled;
bool openToEveryone; //can everyone call the function to get the reward or only approved?
}
/* ========== STATE VARIABLES ========== */
IContractRegistry... | updateRequiredKeeperStake | function updateRequiredKeeperStake(uint256 _amount) external {
IACLRegistry(contractRegistry.getContract(keccak256("ACLRegistry"))).requireRole(keccak256("DAO"), msg.sender);
emit RequiredKeeperStakeChanged(requiredKeeperStake, _amount);
requiredKeeperStake = _amount;
}
| /**
* @notice Sets the required amount of POP a keeper needs to have staked to handle incentivized functions.
* @param _amount Amount of POP a keeper needs to stake
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | GNU GPLv3 | {
"func_code_index": [
6975,
7261
]
} | 20,558 | |||
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | add | function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(PoolInfo({
... | // Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
3002,
3521
]
} | 20,559 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | set | function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
| // Update the given pool's SUSHI allocation point. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
3613,
3922
]
} | 20,560 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | getMultiplier | function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
if (_to <= bonusEndBlock) {
return _to.sub(_from).mul(BONUS_MULTIPLIER);
} else if (_from >= bonusEndBlock) {
return _to.sub(_from);
} else {
return bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER)... | // Return reward multiplier over the given _from to _to block. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
3997,
4425
]
} | 20,561 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | pendingSushi | function pendingSushi(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accSushiPerShare = pool.accSushiPerShare;
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (block.numbe... | // View function to see pending SUSHIs on frontend. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
4485,
5258
]
} | 20,562 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward vairables for all pools. Be careful of gas spending! | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
5336,
5521
]
} | 20,563 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | mint | function mint(uint256 amount) public onlyOwner{
sushi.mint(devaddr, amount);
}
| // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
5590,
5687
]
} | 20,564 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | updatePool | function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.number <= pool.lastRewardBlock) {
return;
}
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
5756,
6550
]
} | 20,565 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | deposit | function deposit(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending = user.amount.mul(pool.accSushiPerShare).div(1e12).sub(user.rewardDebt);
saf... | // Deposit LP tokens to MasterChef for SUSHI allocation. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
6615,
7279
]
} | 20,566 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | withdraw | function withdraw(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, "withdraw: not good");
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accSushiPerShare).div(1e12).sub(u... | // Withdraw LP tokens from MasterChef. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
7326,
7986
]
} | 20,567 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
pool.lpToken.safeTransfer(address(msg.sender), user.amount);
emit EmergencyWithdraw(msg.sender, _pid, user.amount);
user.amount = 0;
user.rewardDebt... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
8052,
8413
]
} | 20,568 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | safeSushiTransfer | function safeSushiTransfer(address _to, uint256 _amount) internal {
uint256 sushiBal = sushi.balanceOf(address(this));
if (_amount > sushiBal) {
sushi.transfer(_to, sushiBal);
} else {
sushi.transfer(_to, _amount);
}
}
| // Safe sushi transfer function, just in case if rounding error causes pool to not have enough SUSHIs. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
8524,
8814
]
} | 20,569 |
MasterChef | contracts/MasterChef.sol | 0x2f2395a87986b5cb3f1c928df55848e4b10c82f0 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Sushi. He can make Sushi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once SUSHI is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | dev | function dev(address _devaddr) public {
require(msg.sender == devaddr, "dev: wut?");
devaddr = _devaddr;
}
| // Update dev address by the previous dev. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://267381f5b49510e3f18ed5530a721f23f1d39a302a4a4943f9fce6c518cbcb80 | {
"func_code_index": [
8865,
8999
]
} | 20,570 |
TutellusCrowdsale | zeppelin-solidity/contracts/crowdsale/CappedCrowdsale.sol | 0x0f3d5562ca6084f7d59ce10dc5ab672257573de6 | Solidity | CappedCrowdsale | contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 public cap;
function CappedCrowdsale(uint256 _cap) {
require(_cap > 0);
cap = _cap;
}
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function ... | /**
* @title CappedCrowdsale
* @dev Extension of Crowdsale with a max amount of funds raised
*/ | NatSpecMultiLine | validPurchase | function validPurchase() internal constant returns (bool) {
bool withinCap = weiRaised.add(msg.value) <= cap;
return super.validPurchase() && withinCap;
}
| // overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment | LineComment | v0.4.15+commit.bbb8e64f | bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2 | {
"func_code_index": [
309,
479
]
} | 20,571 | |
TutellusCrowdsale | zeppelin-solidity/contracts/crowdsale/CappedCrowdsale.sol | 0x0f3d5562ca6084f7d59ce10dc5ab672257573de6 | Solidity | CappedCrowdsale | contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 public cap;
function CappedCrowdsale(uint256 _cap) {
require(_cap > 0);
cap = _cap;
}
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function ... | /**
* @title CappedCrowdsale
* @dev Extension of Crowdsale with a max amount of funds raised
*/ | NatSpecMultiLine | hasEnded | function hasEnded() public constant returns (bool) {
bool capReached = weiRaised >= cap;
return super.hasEnded() || capReached;
}
| // overriding Crowdsale#hasEnded to add cap logic
// @return true if crowdsale event has ended | LineComment | v0.4.15+commit.bbb8e64f | bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2 | {
"func_code_index": [
583,
728
]
} | 20,572 | |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
94,
154
]
} | 20,573 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
237,
310
]
} | 20,574 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
534,
616
]
} | 20,575 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
895,
983
]
} | 20,576 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
1647,
1726
]
} | 20,577 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
2039,
2141
]
} | 20,578 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @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.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
606,
1033
]
} | 20,579 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
1963,
2365
]
} | 20,580 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
3121,
3299
]
} | 20,581 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
3524,
3724
]
} | 20,582 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
4094,
4325
]
} | 20,583 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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");
require(isContract(target), "Address: call to non-contract");
// solhint-disa... | /**
* @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.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
4576,
5111
]
} | 20,584 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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 | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
5291,
5495
]
} | 20,585 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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 | functionStaticCall | function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.stat... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
5682,
6109
]
} | 20,586 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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 | functionDelegateCall | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
6291,
6496
]
} | 20,587 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | 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 | functionDelegateCall | function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.deleg... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
6685,
7113
]
} | 20,588 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | SafeERC20 | library SafeERC20 {
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 va... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
714,
1341
]
} | 20,589 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | SafeERC20 | library SafeERC20 {
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 va... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
2489,
3255
]
} | 20,590 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | Strings | library Strings {
bytes16 private constant alphabet = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT lice... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
180,
908
]
} | 20,591 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | Strings | library Strings {
bytes16 private constant alphabet = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT lice... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
1013,
1358
]
} | 20,592 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | Strings | library Strings {
bytes16 private constant alphabet = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT lice... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = alphabet[value & 0xf];
value >>= 4;
}
... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
1481,
1933
]
} | 20,593 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | IERC165 | interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This f... | /**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
374,
455
]
} | 20,594 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | ERC165 | abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
} | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interface... | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
103,
265
]
} | 20,595 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | AccessControl | abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping (address => bool) members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for t... | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId
|| super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
1953,
2175
]
} | 20,596 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | AccessControl | abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping (address => bool) members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for t... | NatSpecMultiLine | hasRole | function hasRole(bytes32 role, address account) public view override returns (bool) {
return _roles[role].members[account];
}
| /**
* @dev Returns `true` if `account` has been granted `role`.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
2262,
2406
]
} | 20,597 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | AccessControl | abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping (address => bool) members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for t... | NatSpecMultiLine | _checkRole | function _checkRole(bytes32 role, address account) internal view {
if(!hasRole(role, account)) {
revert(string(abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role),... | /**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
2691,
3080
]
} | 20,598 |
StakePoolSimpleCombined | StakePoolSimpleCombined.sol | 0x5d69b2f978047642ee287d8211c76b0f2aa2e457 | Solidity | AccessControl | abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping (address => bool) members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `... | /**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for t... | NatSpecMultiLine | getRoleAdmin | function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _roles[role].adminRole;
}
| /**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://cfee7ca41aae620cb725e1b0dc30f436edbe60c9626b3dc9dc3f2d47025f0ced | {
"func_code_index": [
3264,
3392
]
} | 20,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.