随笔分类 - 区块链
摘要:export function fmtWalletAddress(str) { if (str == '' || str == undefined || str == "undefined") return str return str.replace(/^(.{6})(?:\w+)(.{4})$/
阅读全文
摘要:let b = utils.formatUnits(item[0].toString(), 9); let str1 = ""; let str2 = ""; // 处理有小数点的情况 if (String(b).indexOf(".") > -1) { console.log("是小数"); //
阅读全文
摘要:<div @click="add">add</div> import { BigNumber } from "ethers"; const obj = { chainId: '97', blockBrowseUrl: 'https://testnet.bscscan.com', name: 'Bin
阅读全文
摘要:import { utils, BigNumber } from 'ethers' import { Message } from 'element-ui' import config from '@/config' import { fmtWalletAddress } from '@/utils
阅读全文
摘要:import { ethers } from 'ethers' import MetaMaskOnboarding from '@metamask/onboarding' import { Message } from 'element-ui' async function connectMetaM
阅读全文
摘要: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
阅读全文