mirror of
https://github.com/status-im/nim-codex.git
synced 2025-02-12 18:56:36 +00:00
27 lines
682 B
Nim
27 lines
682 B
Nim
import pkg/ethers
|
|
|
|
import ../../purchasing
|
|
import ../../logutils
|
|
import ../market
|
|
import ../clock
|
|
import ./interactions
|
|
|
|
export purchasing
|
|
export logutils
|
|
|
|
type ClientInteractions* = ref object of ContractInteractions
|
|
purchasing*: Purchasing
|
|
|
|
proc new*(
|
|
_: type ClientInteractions, clock: OnChainClock, purchasing: Purchasing
|
|
): ClientInteractions =
|
|
ClientInteractions(clock: clock, purchasing: purchasing)
|
|
|
|
proc start*(self: ClientInteractions) {.async.} =
|
|
await procCall ContractInteractions(self).start()
|
|
await self.purchasing.start()
|
|
|
|
proc stop*(self: ClientInteractions) {.async.} =
|
|
await self.purchasing.stop()
|
|
await procCall ContractInteractions(self).stop()
|