mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-01-09 22:25:51 +00:00
18 lines
505 B
Nim
18 lines
505 B
Nim
import std/os
|
|
import std/options
|
|
import pkg/ethers
|
|
import pkg/codex/contracts/marketplace
|
|
|
|
const hardhatMarketAddress = Address.init("0x59b670e9fA9D0A427751Af201D676719a970857b").get()
|
|
const marketAddressEnvName = "CODEX_MARKET_ADDRESS"
|
|
|
|
proc address*(_: type Marketplace): Address =
|
|
if existsEnv(marketAddressEnvName):
|
|
without address =? Address.init(getEnv(marketAddressEnvName)):
|
|
raiseAssert "Invalid env. variable marketplace contract address"
|
|
|
|
return address
|
|
|
|
hardhatMarketAddress
|
|
|