mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-02-27 13:50:47 +00:00
* perf: contract storage optimizations * Apply optimization changes * Apply optimizing parameters sizing * Update codex-contracts-eth * bump latest changes in contracts branch * Change requestDurationLimit to uint64 * fix tests * fix tests --------- Co-authored-by: Arnaud <arnaud@status.im> Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
27 lines
684 B
Nim
27 lines
684 B
Nim
import pkg/codex/contracts/requests
|
|
import pkg/codex/sales/slotqueue
|
|
|
|
type MockSlotQueueItem* = object
|
|
requestId*: RequestId
|
|
slotIndex*: uint16
|
|
slotSize*: uint64
|
|
duration*: uint64
|
|
pricePerBytePerSecond*: UInt256
|
|
collateralPerByte*: UInt256
|
|
expiry*: uint64
|
|
seen*: bool
|
|
|
|
proc toSlotQueueItem*(item: MockSlotQueueItem): SlotQueueItem =
|
|
SlotQueueItem.init(
|
|
requestId = item.requestId,
|
|
slotIndex = item.slotIndex,
|
|
ask = StorageAsk(
|
|
slotSize: item.slotSize,
|
|
duration: item.duration,
|
|
pricePerBytePerSecond: item.pricePerBytePerSecond,
|
|
collateralPerByte: item.collateralPerByte,
|
|
),
|
|
expiry = item.expiry,
|
|
seen = item.seen,
|
|
)
|