10 使用ethers将一个大数传进合约里发生溢出后换成string传入报错(能直接给解决办法吗?)

const newPriceMes=await Promise.all(thisMaxPriceMes.map(async(item)=>{ const unixTime = (Date.parse(item.time))/1000; let stringAmount=item.amount.toString(); let thisAmount = ethers.utils.parseUnits(stringAmount,18); return{ buyPrice:item.price*1000, buyTime:unixTime, buyTotalAmount:thisAmount, buyerAddress:item.buyer, finishAmount:item.finishAmount, solderAddress:item.solder, tokenAddress:item.StableCoin, tradeId:item.id, tradeState:item.state } })) console.log("MaxMes:",newPriceMes[0]); const salePledge=await FactoryContract.SalePledge(newPriceMes[0],getEndNumber);

image.png

请先 登录 后评论

1 个回答

NPC.李括 - 全职奶爸
请先 登录 后评论