#Big Integer Supply

17 messages · Page 1 of 1 (latest)

bleak mulch
#

Can anyone help me solve this javascript thing? Essentially, if someone wants to make a big asset with high supply and decimals, javascript doesn't support that integer and throws an error. I think i need to use bigint somewhere, but my coding knowledge is shot

#
        from: wallet,
        manager: wallet,
        assetName: data_for_txns[i].asset_name,
        unitName: data_for_txns[i].unit_name,
        total:
          parseInt(data_for_txns[i].total_supply *
          10 ** parseInt(data_for_txns[i].decimals),
        decimals: parseInt(data_for_txns[i].decimals),```
#

What dashboard? On console?

versed sedge
#

You want to do all your math with bigints, don't mix in number/int

#

For constants like 10 use 10n

#

Instead of parseInt use BigInt

#

@bleak mulch what did you do to attract all these scammers? 😂

bleak mulch
#

I have no idea

#

@delicate yacht check this out

versed sedge
#

also see #🚨│report-scams

delicate yacht
versed sedge
#

just look at the size of those integers

bleak mulch
#

Dem Integers bring all the scammers to the yard

delicate yacht
#
const hugeString = BigInt("9007199254740991");
// 9007199254740991n```
umbral zealot
#

I assume that's answered, right?