[contracts] Remove obsolete marketplace tests

This commit is contained in:
Mark Spanbroek 2022-03-17 14:17:14 +01:00 committed by markspanbroek
parent efb4f5c375
commit 42edbf5076
2 changed files with 0 additions and 43 deletions

View File

@ -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

View File

@ -1,4 +1,3 @@
import ./contracts/testMarketplace
import ./contracts/testCollateral
import ./contracts/testContracts