Logo
Explore Help
Sign In
logos-storage/logos-storage-contracts-eth
1
0
Fork 0
You've already forked logos-storage-contracts-eth
mirror of https://github.com/logos-storage/logos-storage-contracts-eth.git synced 2026-01-03 13:53:10 +00:00
Code Issues Packages Projects Releases Wiki Activity
logos-storage-contracts-eth/test/collateral.js

6 lines
142 B
JavaScript
Raw Normal View History

Feat: price per byte (#208) * changes reward => pricePerByte * collateral => collateralPerByte * updates tests * introduces AskHelpers to compute price and collateral per slot * adds public view function returning currentCollateral for the slot * updates names for price and collateral * uses pricePerSlotPerSecond in maxPriceHelper * adds collateralPerSlot helper * makes sure that the intended use of the <<currentCollateral>> view function is demonstrated in tests * formatting * fix comment * mints more tokens so that it can be used with contracts tests in nim-codex * Renaming <<collateral>> and <<reward>> to <<collateralPerByte>> and <<pricePerBytePerSecond>> respectively (merged in the meantime to the master)
2025-01-24 15:28:29 +01:00
function collateralPerSlot(request) {
return request.ask.collateralPerByte * request.ask.slotSize
}
module.exports = { collateralPerSlot }
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.0 Page: 35ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API