View Source: contracts/pool/Bond/BondPoolBase.sol
↗ Extends: IBondPool, Recoverable ↘ Derived Contracts: BondPool
BondPoolBase
- constructor(IStore s)
- getNpmMarketPrice()
- calculateTokensForLp(uint256 lpTokens)
- getInfo(address forAccount)
- setup(struct IBondPool.SetupBondPoolArgs args)
- version()
- getName()
function (IStore s) internal nonpayable Recoverable
Arguments
Name | Type | Description |
---|---|---|
s | IStore |
Source Code
constructor(IStore s) Recoverable(s) {}
function getNpmMarketPrice() external view
returns(uint256)
Arguments
Name | Type | Description |
---|
Source Code
function getNpmMarketPrice() external view override returns (uint256) {
return s.getNpmPriceInternal(1 ether);
}
function calculateTokensForLp(uint256 lpTokens) external view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
lpTokens | uint256 |
Source Code
function calculateTokensForLp(uint256 lpTokens) external view override returns (uint256) {
return s.calculateTokensForLpInternal(lpTokens);
}
Gets the bond pool information
function getInfo(address forAccount) external view
returns(struct IBondPool.BondPoolInfoType)
Arguments
Name | Type | Description |
---|---|---|
forAccount | address |
Source Code
function getInfo(address forAccount) external view override returns (BondPoolInfoType memory) {
return s.getBondPoolInfoInternal(forAccount);
}
Sets up the bond pool
function setup(struct IBondPool.SetupBondPoolArgs args) external nonpayable nonReentrant
Arguments
Name | Type | Description |
---|---|---|
args | struct IBondPool.SetupBondPoolArgs |
Source Code
function setup(SetupBondPoolArgs calldata args) external override nonReentrant {
// @suppress-zero-value-check The uint values are checked in the function `setupBondPoolInternal`
s.mustNotBePaused();
AccessControlLibV1.mustBeLiquidityManager(s);
s.setupBondPoolInternal(args);
emit BondPoolSetup(args);
}
Version number of this contract
function version() external pure
returns(bytes32)
Arguments
Name | Type | Description |
---|
Source Code
function version() external pure override returns (bytes32) {
return "v0.1";
}
Name of this contract
function getName() external pure
returns(bytes32)
Arguments
Name | Type | Description |
---|
Source Code
function getName() external pure override returns (bytes32) {
return ProtoUtilV1.CNAME_BOND_POOL;
}
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Cover
- CoverBase
- CoverLibV1
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundStablecoinDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundStablecoinDelegator
- Finalization
- ForceEther
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICompoundERC20DelegatorLike
- ICover
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- ILiquidityEngine
- IMember
- INeptuneRouterV1
- InvalidStrategy
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceOracle
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IStoreLike
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultDelegate
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- MockAccessControlUser
- MockCoverUtilUser
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockFlashBorrower
- MockLiquidityEngineUser
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockRegistryClient
- MockStore
- MockStoreKeyUtilUser
- MockValidationLibUser
- MockVault
- MockVaultLibUser
- NeptuneRouterV1
- NPM
- NpmDistributor
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PoorMansERC20
- POT
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- TimelockController
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultDelegate
- VaultDelegateBase
- VaultDelegateWithFlashLoan
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- VaultLiquidity
- VaultStrategy
- WithFlashLoan
- WithPausability
- WithRecovery
- Witness