mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-10 02:45:59 +00:00
8681a40ee7
Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com> Co-authored-by: markspanbroek <mark@spanbroek.net>
30 lines
648 B
Nim
30 lines
648 B
Nim
import pkg/ethers
|
|
import pkg/chronicles
|
|
|
|
import ../../sales
|
|
import ./interactions
|
|
|
|
export sales
|
|
export chronicles
|
|
|
|
type
|
|
HostInteractions* = ref object of ContractInteractions
|
|
sales*: Sales
|
|
|
|
proc new*(
|
|
_: type HostInteractions,
|
|
clock: Clock,
|
|
sales: Sales
|
|
): HostInteractions =
|
|
## Create a new HostInteractions instance
|
|
##
|
|
HostInteractions(clock: clock, sales: sales)
|
|
|
|
method start*(self: HostInteractions) {.async.} =
|
|
await procCall ContractInteractions(self).start()
|
|
await self.sales.start()
|
|
|
|
method stop*(self: HostInteractions) {.async.} =
|
|
await self.sales.stop()
|
|
await procCall ContractInteractions(self).start()
|