functions
  

  
  function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) public constant returns (bool limitBroken);
  
  function isCrowdsaleFull() public constant returns (bool);

  
  function assignTokens(address receiver, uint tokenAmount) private;
}


contract BonusFinalizeAgent is FinalizeAgent, SafeMathLib {

  CrowdsaleToken public token;
  Crowdsale public crowdsale;
  uint256 public allocatedTokens;
  uint256 tokenCap;
  address walletAddress;


  function BonusFinalizeAgent(CrowdsaleToken _token, Crowdsale _crowdsale, uint256 _tokenCap, address _walletAddress) public {
    token = _token;
    crowdsale = _crowdsale;

    
    require(address(crowdsale) != 0);

    tokenCap = _tokenCap;
    walletAddress = _walletAddress;
  }