Verified contractPartialLicenseRef-Dromos-Restricted-Use-1.0
VotingRewardsFactoryLibrary
Address0x1c3821772bfaae08ee2d4ed8e2c29844ca49634e
- Balance
0 ETH
- Transactions
0
- Compiler
solc 0.8.36
- Same code
1 more contract
Details
- Compiler
- solc 0.8.36+commit.8a079791
- Language
- solidity
- Optimization
- Yes, 10,000 runs
- EVM version
- prague
- License
- LicenseRef-Dromos-Restricted-Use-1.0
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,206,268
- Creation transaction
- 0x9bd5810740…2f41ffddca
- Libraries
- V3/src/src/libraries/RewardsLogicLibrary.sol:RewardsLogicLibrary0x2b73…8d6720V3/src/src/libraries/LeafAllocationLibrary.sol:LeafAllocationLibrary0xc7e2…3e0398V3/src/src/libraries/VotingRewardsFactoryLibrary.sol:VotingRewardsFactoryLibrary0x1c38…49634e
45 files
The source code is large: one file is shown at a time. Choose a file in the list.
- V3/src/libraries/VotingRewardsFactoryLibrary.solmain1.17 KB
- V3/src/interfaces/bridge/ILeafMessageOrchestrator.sol10.37 KB
- V3/src/interfaces/bridge/IMessageAdapter.sol4.07 KB
- V3/src/interfaces/bridge/IMessageOrchestrator.sol4.59 KB
- V3/src/interfaces/external/IWETH.sol472 B
- V3/src/interfaces/factories/IFactoryRegistry.sol20.51 KB
- V3/src/interfaces/factories/IGaugeFactory.sol17.5 KB
- V3/src/interfaces/gauges/IGauge.sol7.77 KB
- V3/src/interfaces/rewards/IFeeDistribution.sol4.28 KB
- V3/src/interfaces/rewards/IIncentiveStreaming.sol8.96 KB
- V3/src/interfaces/rewards/IVotingCheckpoints.sol5.91 KB
- V3/src/interfaces/rewards/IVotingRewardsManager.sol9.36 KB
- V3/src/interfaces/token/IBaseTokenExtensions.sol295 B
- V3/src/interfaces/token/IReceiptTokenExtensions.sol1.08 KB
- V3/src/interfaces/tokenRegistry/ITokenNFT.sol4.59 KB
- V3/src/interfaces/tokenRegistry/ITokenRegistry.sol22.4 KB
- V3/src/interfaces/voter/ILeafVoter.sol47.38 KB
- V3/src/interfaces/voter/IVoterCommon.sol10.65 KB
- V3/src/libraries/ProtocolConstants.sol1.97 KB
- V3/src/libraries/ProtocolTimeLibrary.sol559 B
- V3/src/libraries/RewardsLogicLibrary.sol41.11 KB
- V3/src/libraries/SafeCastLibrary.sol2.3 KB
- V3/src/rewards/FeeDistribution.sol6.1 KB
- V3/src/rewards/IncentiveStreaming.sol6.26 KB
- V3/src/rewards/VotingCheckpoints.sol13.82 KB
- V3/src/rewards/VotingRewardsManager.sol32.48 KB
- node_modules/@nomad-xyz/excessively-safe-call/src/ExcessivelySafeCall.sol5.61 KB
- node_modules/@openzeppelin/contracts/access/IAccessControl.sol3.34 KB
- node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol4.45 KB
- node_modules/@openzeppelin/contracts/interfaces/IERC165.sol193 B
- node_modules/@openzeppelin/contracts/interfaces/IERC20.sol182 B
- node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol2.78 KB
- node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol13.31 KB
- node_modules/@openzeppelin/contracts/utils/Arrays.sol35.17 KB
- node_modules/@openzeppelin/contracts/utils/Comparators.sol443 B
- node_modules/@openzeppelin/contracts/utils/Panic.sol1.97 KB
- node_modules/@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol2.85 KB
- node_modules/@openzeppelin/contracts/utils/SlotDerivation.sol5.32 KB
- node_modules/@openzeppelin/contracts/utils/StorageSlot.sol4.18 KB
- node_modules/@openzeppelin/contracts/utils/TransientSlot.sol5.08 KB
- node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol871 B
- node_modules/@openzeppelin/contracts/utils/math/Math.sol32.66 KB
- node_modules/@openzeppelin/contracts/utils/math/SafeCast.sol34.94 KB
- node_modules/@openzeppelin/contracts/utils/structs/EnumerableSet.sol33.3 KB
- node_modules/solady/src/utils/SafeTransferLib.sol29 KB
V3/src/libraries/VotingRewardsFactoryLibrary.sol
// SPDX-License-Identifier: LicenseRef-Dromos-Restricted-Use-1.0
pragma solidity 0.8.36;
import {VotingRewardsManager} from 'V3/rewards/VotingRewardsManager.sol';
/// @title VotingRewardsFactoryLibrary
/// @notice Deploys VotingRewardsManager instances.
library VotingRewardsFactoryLibrary {
/// @notice Deploys a VotingRewardsManager.
/// @param _voter Voter authorized by the deployed manager.
/// @param _gauge Gauge linked to the deployed manager.
/// @param _gaugeFactory Gauge factory authorized to flush fees.
/// @param _wrappedNative Wrapped native token used for reward unwrapping.
/// @param _initialRewards Initial reward token addresses.
/// @return Address of the deployed VotingRewardsManager.
function createVotingRewardsManager(
address _voter,
address _gauge,
address _gaugeFactory,
address _wrappedNative,
address[] calldata _initialRewards
) external returns (address) {
return address(
new VotingRewardsManager({
_voter: _voter,
_gauge: _gauge,
_gaugeFactory: _gaugeFactory,
_wrappedNative: _wrappedNative,
_initialRewards: _initialRewards
})
);
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {
"V3/src/src/libraries/RewardsLogicLibrary.sol": {
"RewardsLogicLibrary": "0x2b73DF2e7e957C77F1D8C01e0a71aD1fF38D6720"
},
"V3/src/src/libraries/LeafAllocationLibrary.sol": {
"LeafAllocationLibrary": "0xC7E262e848fCa78C3C66Ee3c9835e4E65E3E0398"
},
"V3/src/src/libraries/VotingRewardsFactoryLibrary.sol": {
"VotingRewardsFactoryLibrary": "0x1C3821772BFAAE08eE2D4ED8E2c29844CA49634e"
}
},
"optimizer": {
"runs": 10000,
"enabled": true
},
"viaSSACFG": false,
"evmVersion": "prague",
"remappings": [
"forge-std/=node_modules/forge-std/src/",
"@hyperlane/contracts/=node_modules/@hyperlane-xyz/core/contracts/",
"node_modules/@hyperlane-xyz/:@openzeppelin/contracts/=node_modules/@openzeppelin/contracts-v4/",
"node_modules/@hyperlane-xyz/:@openzeppelin/contracts/=node_modules/@openzeppelin/contracts-v4/",
"node_modules/@hyperlane-xyz/:@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable-v4/",
"node_modules/@hyperlane-xyz/:@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable-v4/",
"@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
"@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
"@openzeppelin4/contracts/=node_modules/@openzeppelin/contracts-v4/",
"@solady/=node_modules/solady/src/",
"@nomad-xyz/src/=node_modules/@nomad-xyz/excessively-safe-call/src/",
"V3/=V3/src/",
"V3-script/=V3/script/",
"V3-test/=V3/test/"
],
"experimental": false
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.