Description:
Decentralized Finance (DeFi) protocol contract providing Factory functionality.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"contracts/AlgebraVaultFactoryStub.sol": {
"content": "// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.20;
pragma abicoder v1;
import './interfaces/vault/IAlgebraVaultFactory.sol';
/// @title Algebra vault factory stub
/// @notice This contract is used to set AlgebraCommunityVault as communityVault in new pools
contract AlgebraVaultFactoryStub is IAlgebraVaultFactory {
/// @notice the address of AlgebraCommunityVault
address public immutable defaultAlgebraCommunityVault;
constructor(address _algebraCommunityVault) {
require(_algebraCommunityVault != address(0));
defaultAlgebraCommunityVault = _algebraCommunityVault;
}
/// @inheritdoc IAlgebraVaultFactory
function getVaultForPool(address) external view override returns (address) {
return defaultAlgebraCommunityVault;
}
/// @inheritdoc IAlgebraVaultFactory
function createVaultForPool(address, address, address, address, address) external view override returns (address) {
return defaultAlgebraCommunityVault;
}
}
"
},
"contracts/interfaces/vault/IAlgebraVaultFactory.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;
/// @title The interface for the Algebra Vault Factory
/// @notice This contract can be used for automatic vaults creation
/// @dev Version: Algebra Integral
interface IAlgebraVaultFactory {
/// @notice returns address of the community fee vault for the pool
/// @param pool the address of Algebra Integral pool
/// @return communityFeeVault the address of community fee vault
function getVaultForPool(address pool) external view returns (address communityFeeVault);
/// @notice creates the community fee vault for the pool if needed
/// @param pool the address of Algebra Integral pool
/// @return communityFeeVault the address of community fee vault
function createVaultForPool(
address pool,
address creator,
address deployer,
address token0,
address token1
) external returns (address communityFeeVault);
}
"
}
},
"settings": {
"evmVersion": "paris",
"optimizer": {
"enabled": true,
"runs": 800
},
"metadata": {
"bytecodeHash": "none",
"useLiteralContent": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}
}}
Submitted on: 2025-11-06 14:19:20
Comments
Log in to comment.
No comments yet.