随笔分类 -  区块链

摘要:export function fmtWalletAddress(str) { if (str == '' || str == undefined || str == "undefined") return str return str.replace(/^(.{6})(?:\w+)(.{4})$/ 阅读全文
posted @ 2023-05-24 11:31 起风了1573 阅读(9) 评论(0) 推荐(0) 编辑
摘要:let b = utils.formatUnits(item[0].toString(), 9); let str1 = ""; let str2 = ""; // 处理有小数点的情况 if (String(b).indexOf(".") > -1) { console.log("是小数"); // 阅读全文
posted @ 2023-05-12 16:14 起风了1573 阅读(48) 评论(0) 推荐(0) 编辑
摘要:<div @click="add">add</div> import { BigNumber } from "ethers"; const obj = { chainId: '97', blockBrowseUrl: 'https://testnet.bscscan.com', name: 'Bin 阅读全文
posted @ 2023-02-13 16:27 起风了1573 阅读(184) 评论(0) 推荐(0) 编辑
摘要:import { utils, BigNumber } from 'ethers' import { Message } from 'element-ui' import config from '@/config' import { fmtWalletAddress } from '@/utils 阅读全文
posted @ 2021-11-25 15:18 起风了1573 阅读(368) 评论(0) 推荐(0) 编辑
摘要:import { ethers } from 'ethers' import MetaMaskOnboarding from '@metamask/onboarding' import { Message } from 'element-ui' async function connectMetaM 阅读全文
posted @ 2021-11-25 15:12 起风了1573 阅读(1421) 评论(0) 推荐(0) 编辑
摘要:1.安装node 2.安装 solc npm install -g socl 3.安装 truffle npm install -g truffle 4.安装 ganache-cli npm install -g ganache-cli 5.安装 web3 npm install -g web3 6 阅读全文
posted @ 2021-10-20 16:16 起风了1573 阅读(578) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示