olta-art / olta.js

2 stars 0 forks source link

Abstract away parsing and formatting data #7

Closed george-e-d-g-e closed 4 months ago

george-e-d-g-e commented 4 months ago

A bit of a pain point is to parse and format bigInt values to number/strings

We add an 'n' to the end of numbers in the data to handle these numbers as bigInts on the contract. Allowing for really big numbers (common practice in smart contracts) for example 1 gets formatted to '1n' and then parsed back to 1

One way to solve this is to just use numbers on the contract.

Or abstract away the parsing and formatting by checking the datatype and schema and processing the data. This would give artists a more friendlier developer experience as the don't have to worry about types.