Lesson 7 Error: invalid address or ENS name (argument="name", value=undefined, code=INVALID_ARGUMENT, version=contracts/5.7.0) #2745
-
I met problem when testing fundme
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
@wxy-sudo : Can you send me your repo link! |
Beta Was this translation helpful? Give feedback.
-
Correct this line,
it should be [] instead, as mappings are essentially arrays of arrays with keys (dictionary in Python, or a hash map). |
Beta Was this translation helpful? Give feedback.
-
Hey @wxy-sudo a major error exists in this line |
Beta Was this translation helpful? Give feedback.
-
I met this problem when running here is the useStakeTokens code: " /**
const tokenFarmInterface = new utils.Interface(abi) const tokenFarmContract = new Contract( const { send: stakeTokensSend, state: stakeTokensState } = const erc20Interface = new utils.Interface(Erc20.abi) const tokenContract = new Contract(tokenAddress, erc20Interface) const { send: approveErc20Send, state: approveErc20State } = const [amountToStake, setAmountToStake] = useState("0") useEffect(() => { const send = (amount: string) => { const [state, setState] = useState(approveErc20State) useEffect(() => { return { send, state } " |
Beta Was this translation helpful? Give feedback.
Hey @wxy-sudo a major error exists in this line
deployer = (await getNamedAccounts).deployer
The correct line should be
deployer = (await getNamedAccounts()).deployer
. It is a subtle mistake but costly.Please make the necessary changes.