poly-flashloan-bot icon indicating copy to clipboard operation
poly-flashloan-bot copied to clipboard

loanAmount: 10000000000,

Open ezera23 opened this issue 3 years ago • 2 comments

Is it normal to have 10 billions in my transaction debug as loanAmount and I set only 10000 as loan amount

ezera23 avatar Jan 14 '22 08:01 ezera23

I made another try by changing the const loanAmount to 1000 in config.ts and still have 10billion in the debug. let me know if its just some 0 added due to format number thanks

ezera23 avatar Jan 14 '22 11:01 ezera23

That probably shows the numbers in wei not in unit.

You can format that number with ethers.js.

ref. https://docs.ethers.io/v5/api/utils/display-logic/#utils-formatUnits

yuichiroaoki avatar Jan 17 '22 00:01 yuichiroaoki