smartcontractkit / chainlink-cosmos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scale 'recommended_gas_price' from uLUNA to LUNA

krebernisak opened this issue · comments

Suggestion by @archseer:

for recommended_gas_price: the API returns uLUNA but we want to turn that into a u128 with 18 decimal places
(uluna = micro luna = luna * 10⁻⁶)

there wasn't an easy way to construct a decimal and say "this only has 6 decimal places" because it hardcodes to 18 decimals https://github.com/smartcontractkit/chainlink-terra/blob/9c529e3c016e23234cdbde8b4d9c7952ebe2912f/contracts/ocr2/src/decimal.rs#L30

well there's https://github.com/smartcontractkit/chainlink-terra/blob/9c529e3c016e23234cdbde8b4d9c7952ebe2912f/contracts/ocr2/src/decimal.rs#L76-L79 so we could technically support uluna

Originally posted by @krebernisak in #36 (comment)