mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
clean test
This commit is contained in:
parent
c657547adb
commit
ea7562f908
@ -215,93 +215,7 @@ describe('Publish tests', async () => {
|
|||||||
aquarius
|
aquarius
|
||||||
)
|
)
|
||||||
|
|
||||||
console.log('Published asset, ddo id:', asset)
|
assert(asset !== null, 'Could not publish asset!')
|
||||||
|
|
||||||
// const nftParams: NftCreateData = {
|
|
||||||
// name: 'testNftFre',
|
|
||||||
// symbol: 'TSTF',
|
|
||||||
// templateIndex: 1,
|
|
||||||
// tokenURI: '',
|
|
||||||
// transferable: true,
|
|
||||||
// owner: await publisherAccount.getAddress()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const datatokenParams: DatatokenCreateParams = {
|
|
||||||
// templateIndex: 1,
|
|
||||||
// cap: '100000',
|
|
||||||
// feeAmount: '0',
|
|
||||||
// paymentCollector: ZERO_ADDRESS,
|
|
||||||
// feeToken: ZERO_ADDRESS,
|
|
||||||
// minter: await publisherAccount.getAddress(),
|
|
||||||
// mpFeeAddress: ZERO_ADDRESS
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const fixedPriceParams: FreCreationParams = {
|
|
||||||
// fixedRateAddress: addresses.FixedPrice,
|
|
||||||
// baseTokenAddress: addresses.MockDAI,
|
|
||||||
// owner: await publisherAccount.getAddress(),
|
|
||||||
// marketFeeCollector: await publisherAccount.getAddress(),
|
|
||||||
// baseTokenDecimals: 18,
|
|
||||||
// datatokenDecimals: 18,
|
|
||||||
// fixedRate: '1',
|
|
||||||
// marketFee: '0',
|
|
||||||
// allowedConsumer: await publisherAccount.getAddress(),
|
|
||||||
// withMint: true
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const bundleNFT = await factory.createNftWithDatatokenWithFixedRate(
|
|
||||||
// nftParams,
|
|
||||||
// datatokenParams,
|
|
||||||
// fixedPriceParams
|
|
||||||
// )
|
|
||||||
// const trxReceipt = await bundleNFT.wait()
|
|
||||||
// // events have been emitted
|
|
||||||
// const nftCreatedEvent = getEventFromTx(trxReceipt, 'NFTCreated')
|
|
||||||
// const tokenCreatedEvent = getEventFromTx(trxReceipt, 'TokenCreated')
|
|
||||||
// expect(nftCreatedEvent.event === 'NFTCreated')
|
|
||||||
// expect(tokenCreatedEvent.event === 'TokenCreated')
|
|
||||||
|
|
||||||
// const nftAddress = nftCreatedEvent.args.newTokenAddress
|
|
||||||
// const datatokenAddress = tokenCreatedEvent.args.newTokenAddress
|
|
||||||
// assetUrl.datatokenAddress = datatokenAddress
|
|
||||||
// assetUrl.nftAddress = nftAddress
|
|
||||||
|
|
||||||
// fixedPriceDdo.services[0].files = await ProviderInstance.encrypt(
|
|
||||||
// assetUrl,
|
|
||||||
// config.chainId,
|
|
||||||
// providerUrl
|
|
||||||
// )
|
|
||||||
|
|
||||||
// fixedPriceDdo.metadata.name = 'test-dataset-fixedPrice'
|
|
||||||
// fixedPriceDdo.services[0].datatokenAddress = datatokenAddress
|
|
||||||
|
|
||||||
// fixedPriceDdo.nftAddress = nftAddress
|
|
||||||
|
|
||||||
// fixedPriceDdo.chainId = config.chainId
|
|
||||||
// fixedPriceDdo.id =
|
|
||||||
// 'did:op:' +
|
|
||||||
// SHA256(ethers.utils.getAddress(nftAddress) + config.chainId.toString(10))
|
|
||||||
|
|
||||||
// fixedPricedDID = fixedPriceDdo.id
|
|
||||||
// const isAssetValid: ValidateMetadata = await aquarius.validate(fixedPriceDdo)
|
|
||||||
// assert(isAssetValid.valid === true, 'Published asset is not valid')
|
|
||||||
// const encryptedResponse = await ProviderInstance.encrypt(
|
|
||||||
// fixedPriceDdo,
|
|
||||||
// config.chainId,
|
|
||||||
// providerUrl
|
|
||||||
// )
|
|
||||||
|
|
||||||
// await nft.setMetadata(
|
|
||||||
// nftAddress,
|
|
||||||
// await publisherAccount.getAddress(),
|
|
||||||
// 0,
|
|
||||||
// providerUrl,
|
|
||||||
// '0x123',
|
|
||||||
// '0x02',
|
|
||||||
// encryptedResponse,
|
|
||||||
// isAssetValid.hash,
|
|
||||||
// []
|
|
||||||
// )
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should resolve the fixed price dataset', async () => {
|
it('should resolve the fixed price dataset', async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user