简体   繁体   English

从智能合约中检索多个数据的最佳方式是什么

[英]what is the best way to retrieve multiple data from smart contract

I am done with my smart contract part, and working on front end part using react.我完成了我的智能合约部分,并使用 React 处理前端部分。 There are a lot of state variable that I want to retrieve to use them on web page, but I am not sure what is the best way to get many state variables with ease.我想检索很多 state 变量以在 web 页面上使用它们,但我不确定轻松获取许多 state 变量的最佳方法是什么。 Should I make a structure that stores multiple variables?我应该制作一个存储多个变量的结构吗?

I think you can check this library: web3react .我想你可以检查这个库: web3react It will help you handle all the connections between your smart-contract ad your front, connect with metamask, ...它将帮助你处理你的智能合约和你的前端之间的所有连接,与 metamask 连接,...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM