0

I have create the variables to store the list of address and the funds by every investor. In etherscan.io, When I tried to check the investor list I could not see anything.

Could you please let me know how to get all the investor list using etherscan.io ?

Is it possible to get is using HTML web page with WEB3. ?

I am not sure What I am missing. Could you please assist me ?

address[] private _investors;
mapping(address => uint256) private _investorsAndBalances;


//-------------------------------------------------------------

/**
* @return the amount of wei raised.
*/
function getInvestorsList() public view returns (address[]) {
return _investors;
}


 function buyTokens(address beneficiary) public nonReentrant whenNotPaused payable {

uint256 weiAmount = msg.value;
_preValidatePurchase(beneficiary, weiAmount);

// calculate token amount to be created
uint256 tokens = _getTokenAmount(weiAmount);

// update state
_weiRaised = _weiRaised.add(weiAmount);

_processPurchase(beneficiary, tokens);
emit TokensPurchased(
  msg.sender,
  beneficiary,
  weiAmount,
  tokens
);

_updatePurchasingState(beneficiary, weiAmount);

_forwardFunds();
_postValidatePurchase(beneficiary, weiAmount);

 // -----------------------------------------------------
_investors.push(msg.sender);
_investorsAndBalances[msg.sender] = msg.value;
// -----------------------------------------------------

}

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.