From 42edbf50760d6bf28b38fcd4d709f0c61d743f58 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Thu, 17 Mar 2022 14:17:14 +0100 Subject: [PATCH] [contracts] Remove obsolete marketplace tests --- tests/contracts/testMarketplace.nim | 42 ----------------------------- tests/testContracts.nim | 1 - 2 files changed, 43 deletions(-) delete mode 100644 tests/contracts/testMarketplace.nim diff --git a/tests/contracts/testMarketplace.nim b/tests/contracts/testMarketplace.nim deleted file mode 100644 index 0efcc06e..00000000 --- a/tests/contracts/testMarketplace.nim +++ /dev/null @@ -1,42 +0,0 @@ -import pkg/asynctest -import pkg/chronos -import pkg/nimcrypto -import pkg/contractabi -import dagger/contracts -import ./ethertest -import ./examples - -suite "Marketplace": - - test "hashes requests for storage": - let request = StorageRequest.example - let encoding = AbiEncoder.encode: ( - "[dagger.request.v1]", - request.duration, - request.size, - request.contentHash, - request.proofPeriod, - request.proofTimeout, - request.nonce - ) - let expectedHash = keccak256.digest(encoding).data - check hashRequest(request) == expectedHash - - test "hashes bids": - let bid = StorageBid.example - let encoding = AbiEncoder.encode: ( - "[dagger.bid.v1]", - bid.requestHash, - bid.bidExpiry, - bid.price - ) - let expectedHash = keccak256.digest(encoding).data - check hashBid(bid) == expectedHash - -ethersuite "Marketplace signatures": - - test "signs request and bid hashes": - let hash = hashRequest(StorageRequest.example) - let signer = provider.getSigner() - let signature = await signer.signMessage(@hash) - check signature.len == 65 diff --git a/tests/testContracts.nim b/tests/testContracts.nim index 53dab0a1..9b347dc0 100644 --- a/tests/testContracts.nim +++ b/tests/testContracts.nim @@ -1,4 +1,3 @@ -import ./contracts/testMarketplace import ./contracts/testCollateral import ./contracts/testContracts