current position:Home>Problems of Web3 interaction

Problems of Web3 interaction

2022-02-03 23:23:15 Q & A of Denglian community

var info = infoContract.at('0x8523c7fbcc1cef1cb9922b89bee3fbe3174dbe87');info.getInfo(function(error, result) {if (!error) {$("#info").html(result[0] + result[1] + ' year ');}}); teacher , My contract address is OK , Why report a mistake ...at(''),at(""),at([]),at(['']),at([""])... I've tried , It's all about reporting mistakes , The document says at([address]),Uncaught TypeError: infoContract.at is not a function, The front end can't get information , It's been a few days , Please ask the teacher to help the children ..




Take the answer 1:

Tips infoContract.at is not a function, explain infoContract.at This function no longer exists , stay web3 1.x After the version of the , Many api All have no , You can see web3 1.3 Version of the document , I've had this problem before






Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032323124924.html

Random recommended