Skip to content

Lesson 7: Some questions in "Testing Fund Me" course code #5653

Answered by alymurtazamemon
Dear-MrHe asked this question in Q&A
Discussion options

You must be logged in to vote

@Dear-MrHe

  1. JavaScript/typescript does have any knowledge about contract type so when you return a contract type from the smart contract it returns the address of that contract in the form of a string value. Also vice-versa is true.
  2. Solidity by default create the getter function for all public variables including mappings and arrays. But for mappings and arrays, the getter function takes the parameter and only returns 1 value at a time.

i.e

function addressToAmountFunded(address _add) external view returns (uint256) {
    return addressToAmountFunded[_add];
}

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Dear-MrHe
Comment options

@aaankeet
Comment options

@Dear-MrHe
Comment options

@alymurtazamemon
Comment options

@Dear-MrHe
Comment options

Answer selected by Dear-MrHe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants