Rename `config` to `configuration`
There was a symbol clash preventing compilation and it was easiest to rename `config` to `configuration` in the contracts. Not even remotely ideal, but it was the only way.
This commit is contained in:
parent
4a4880f8b7
commit
f917100268
|
@ -56,7 +56,7 @@ proc approveFunds(market: OnChainMarket, amount: UInt256) {.async.} =
|
|||
discard await token.increaseAllowance(market.contract.address(), amount).confirm(0)
|
||||
|
||||
method getZkeyHash*(market: OnChainMarket): Future[?string] {.async.} =
|
||||
let config = await market.contract.config()
|
||||
let config = await market.contract.configuration()
|
||||
return some config.proofs.zkeyHash
|
||||
|
||||
method getSigner*(market: OnChainMarket): Future[Address] {.async.} =
|
||||
|
@ -65,18 +65,18 @@ method getSigner*(market: OnChainMarket): Future[Address] {.async.} =
|
|||
|
||||
method periodicity*(market: OnChainMarket): Future[Periodicity] {.async.} =
|
||||
convertEthersError:
|
||||
let config = await market.contract.config()
|
||||
let config = await market.contract.configuration()
|
||||
let period = config.proofs.period
|
||||
return Periodicity(seconds: period)
|
||||
|
||||
method proofTimeout*(market: OnChainMarket): Future[UInt256] {.async.} =
|
||||
convertEthersError:
|
||||
let config = await market.contract.config()
|
||||
let config = await market.contract.configuration()
|
||||
return config.proofs.timeout
|
||||
|
||||
method proofDowntime*(market: OnChainMarket): Future[uint8] {.async.} =
|
||||
convertEthersError:
|
||||
let config = await market.contract.config()
|
||||
let config = await market.contract.configuration()
|
||||
return config.proofs.downtime
|
||||
|
||||
method getPointer*(market: OnChainMarket, slotId: SlotId): Future[uint8] {.async.} =
|
||||
|
|
|
@ -17,7 +17,7 @@ export requests
|
|||
type
|
||||
Marketplace* = ref object of Contract
|
||||
|
||||
proc config*(marketplace: Marketplace): MarketplaceConfig {.contract, view.}
|
||||
proc configuration*(marketplace: Marketplace): MarketplaceConfig {.contract, view.}
|
||||
proc token*(marketplace: Marketplace): Address {.contract, view.}
|
||||
proc slashMisses*(marketplace: Marketplace): UInt256 {.contract, view.}
|
||||
proc slashPercentage*(marketplace: Marketplace): UInt256 {.contract, view.}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import pkg/chronos
|
||||
import pkg/ethers/erc20
|
||||
import pkg/ethers
|
||||
from pkg/libp2p import Cid
|
||||
import pkg/codex/contracts/marketplace as mp
|
||||
import pkg/codex/periods
|
||||
|
@ -85,7 +85,7 @@ template marketplacesuite*(name: string, body: untyped) =
|
|||
marketplace = Marketplace.new(Marketplace.address, ethProvider.getSigner())
|
||||
let tokenAddress = await marketplace.token()
|
||||
token = Erc20Token.new(tokenAddress, ethProvider.getSigner())
|
||||
let config = await mp.config(marketplace)
|
||||
let config = await marketplace.configuration()
|
||||
period = config.proofs.period.truncate(uint64)
|
||||
periodicity = Periodicity(seconds: period.u256)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 997696a20e0976011cdbc2f0ff3a844672056ba2
|
||||
Subproject commit 0586425980ae56dd438aaa8963acd0ec185c2e83
|
Loading…
Reference in New Issue