From f9171002680074979112bea77eaf5b0c12233edd Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:49:09 +1100 Subject: [PATCH] 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. --- codex/contracts/market.nim | 8 ++++---- codex/contracts/marketplace.nim | 2 +- tests/integration/marketplacesuite.nim | 4 ++-- vendor/codex-contracts-eth | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/codex/contracts/market.nim b/codex/contracts/market.nim index 69383065..b8d1da68 100644 --- a/codex/contracts/market.nim +++ b/codex/contracts/market.nim @@ -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.} = diff --git a/codex/contracts/marketplace.nim b/codex/contracts/marketplace.nim index f3bac79d..020f501e 100644 --- a/codex/contracts/marketplace.nim +++ b/codex/contracts/marketplace.nim @@ -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.} diff --git a/tests/integration/marketplacesuite.nim b/tests/integration/marketplacesuite.nim index 2b81bdd8..01bfd712 100644 --- a/tests/integration/marketplacesuite.nim +++ b/tests/integration/marketplacesuite.nim @@ -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) diff --git a/vendor/codex-contracts-eth b/vendor/codex-contracts-eth index 997696a2..05864259 160000 --- a/vendor/codex-contracts-eth +++ b/vendor/codex-contracts-eth @@ -1 +1 @@ -Subproject commit 997696a20e0976011cdbc2f0ff3a844672056ba2 +Subproject commit 0586425980ae56dd438aaa8963acd0ec185c2e83