Skip to content

Lesson 10 getEntranceFee() returns 'undefined' #2669

Answered by lausannel
lausannel asked this question in Q&A
Discussion options

You must be logged in to vote

OKay, I found the reason here, and I am really confusing...
In constants/index.ts
Original

import * as contractAddresses from "./contractAddress.json";
import * as abi from "./abi.json";

export { contractAddresses, abi };

After Change

export { default as contractAddresses } from "./contractAddress.json";
export { default as abi } from "./abi.json";

Replies: 5 comments 11 replies

Comment options

You must be logged in to vote
9 replies
@lausannel
Comment options

@lausannel
Comment options

@alymurtazamemon
Comment options

@lausannel
Comment options

@lausannel
Comment options

Comment options

You must be logged in to vote
1 reply
@lausannel
Comment options

Comment options

You must be logged in to vote
1 reply
@lausannel
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by lausannel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants