mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-10 09:23:12 +00:00
16 lines
308 B
Nim
16 lines
308 B
Nim
import pkg/contractabi
|
|
import pkg/nimcrypto
|
|
|
|
export contractabi
|
|
|
|
type
|
|
StorageOffer* = tuple
|
|
host: Address
|
|
requestId: array[32, byte]
|
|
price: UInt256
|
|
expiry: UInt256
|
|
|
|
func id*(offer: StorageOffer): array[32, byte] =
|
|
let encoding = AbiEncoder.encode(offer)
|
|
keccak256.digest(encoding).data
|