基于区块链的毕业设计react-use-etherscan – 反应使用以太网扫描

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计react-use-etherscan – 反应使用以太网扫描 是一篇很好的国外资料

react-use-etherscan

🌊 🏄 ⚛️ React hooks for interacting with Etherscan. Supports Android/iOS/Web/Expo. This is a lifecycle-aware wrapper around etherscan-api.

🚀 Getting Started

Using yarn:

yarn add react-use-etherscan 

🌱 Example

import React, { useState, useEffect } from 'react'; import EtherscanProvider, { useEtherscan, useBalance, useTransactionList } from "react-use-etherscan";  function TransactionList({ address }) {   const [loading, transactions, error] = useTransactionList({ address });   console.warn(loading, transactions, error);   return null; }  function BalanceOf({ address }) {   const [loading, balance, error] = useBalance({ address });   console.warn(loading, balance, error);   return null; }  function EthPrice() {   const { stats } = useEtherscan();   useEffect(     () => (async () => {       const {result} = await stats.ethprice();       console.warn(result);     })() && undefined,     [stats],   );   return null; }  export default function App() {   const [address] = useState("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae");   return (     <EtherscanProvider apiKey="your-api-key">       <TransactionList address={address} />       <BalanceOf address={address} />       <EthPrice />     </EtherscanProvider>   ); }

✌️ License

MIT


react-use-etherscan

🌊 🏄 ⚛️ React hooks for interacting with Etherscan. Supports Android/iOS/Web/Expo. This is a lifecycle-aware wrapper around etherscan-api.

🚀 Getting Started

Using yarn:

yarn add react-use-etherscan 

🌱 Example

import React, { useState, useEffect } from 'react'; import EtherscanProvider, { useEtherscan, useBalance, useTransactionList } from "react-use-etherscan";  function TransactionList({ address }) {   const [loading, transactions, error] = useTransactionList({ address });   console.warn(loading, transactions, error);   return null; }  function BalanceOf({ address }) {   const [loading, balance, error] = useBalance({ address });   console.warn(loading, balance, error);   return null; }  function EthPrice() {   const { stats } = useEtherscan();   useEffect(     () => (async () => {       const {result} = await stats.ethprice();       console.warn(result);     })() && undefined,     [stats],   );   return null; }  export default function App() {   const [address] = useState("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae");   return (     <EtherscanProvider apiKey="your-api-key">       <TransactionList address={address} />       <BalanceOf address={address} />       <EthPrice />     </EtherscanProvider>   ); }

✌️ License

MIT

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/16684.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计react-use-etherscan – 反应使用以太网扫描

提供最优质的资源集合

立即查看 了解详情