flare-foundation / developer-hub

The decentralized origin for Flare builders ☀️
https://dev.flare.network
MIT License
8 stars 23 forks source link

Ftso python guides update #267

Closed Matematik411 closed 1 month ago

Matematik411 commented 1 month ago

Python guides:

Updated some things for better readability and consistency (renamings and additional comments). Three python example files are fixed, as they didn't run due to async errors or a wrong method name (changed to _signed_tx.rawtransaction).

FtsoV2ChangeQuoteFeed.sol:

Updated the file with a function where you can set the number of decimals with a parameter. A function where this parameter is set to 18 (for wei unit) is also added at the end. The sequence of multiplying and dividing with powers of ten (10) is updated to better avoid numerical errors, so the original getNewQuoteFeedValue function is also updated.