current position:Home>How to obtain the public variables of the structure in the contract in web3js through the "public variable automatic creation getter()" mentioned in the solidity document

How to obtain the public variables of the structure in the contract in web3js through the "public variable automatic creation getter()" mentioned in the solidity document

2022-02-03 22:48:39 Q & A of Denglian community

Structure image.png Common state variable address_Diimage.png I'm trying to web3js The following figure is used to obtain image.png But the result is a objectimage.png




Take the answer 1:

Use console.log() There are some types that cannot print out the details of the data .

Here is an array object , You can use subscripts to access the corresponding data .




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

Random recommended