Skip to content

Latest commit

 

History

History
248 lines (218 loc) · 7.58 KB

BondPool.md

File metadata and controls

248 lines (218 loc) · 7.58 KB

BondPool.sol

View Source: contracts/pool/Bond/BondPool.sol

↗ Extends: BondPoolBase

BondPool

Functions

function (IStore s) public nonpayable BondPoolBase 

Arguments

Name Type Description
s IStore
Source Code
constructor(IStore s) BondPoolBase(s) {}

createBond

Create a new bond contract by supplying your LP tokens

function createBond(uint256 lpTokens, uint256 minNpmDesired) external nonpayable nonReentrant 

Arguments

Name Type Description
lpTokens uint256
minNpmDesired uint256
Source Code
function createBond(uint256 lpTokens, uint256 minNpmDesired) external override nonReentrant {
    s.mustNotBePaused();

    require(lpTokens > 0, "Please specify `lpTokens`");
    require(minNpmDesired > 0, "Please enter `minNpmDesired`");

    (uint256 npmToVest, uint256 unlockDate) = s.createBondInternal(lpTokens, minNpmDesired);
    emit BondCreated(msg.sender, lpTokens, npmToVest, unlockDate);
  }

claimBond

Claim your bond and receive your NPM tokens after waiting period

function claimBond() external nonpayable nonReentrant 

Arguments

Name Type Description
Source Code
function claimBond() external override nonReentrant {
    s.mustNotBePaused();

    // @suppress-zero-value-check The uint values are validated in the function `claimBondInternal`
    uint256 npmTransferred = s.claimBondInternal();
    emit BondClaimed(msg.sender, npmTransferred);
  }

Contracts