Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/ddo handler #1906

Merged
merged 22 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
98af187
pushing ddoHandler, ddo.js support with type: module
ahmedraza118 Jan 29, 2025
12a448c
reversing indentation in the package.json
ahmedraza118 Jan 29, 2025
beacf0c
ddo update using updateFields() from ddo.js
ahmedraza118 Jan 29, 2025
cb2e37d
made .mocharc.json for general use with tsx, in root and /test
ahmedraza118 Jan 30, 2025
b85c2a9
updated test:unit command to use /test/mocharc.json
ahmedraza118 Jan 30, 2025
ea55c31
updating ocean.js using npm package @oceanprotocol/ddo-js
ahmedraza118 Feb 18, 2025
49ae752
Merge remote-tracking branch 'origin/main' into feat/ddoHandler
ahmedraza118 Feb 18, 2025
b1689f8
Resolved merge conflicts between ddoHandler and main
ahmedraza118 Feb 18, 2025
4abe6a0
fixed linting issues and warning
ahmedraza118 Feb 18, 2025
8f41736
Update ci.yml
alexcos20 Feb 18, 2025
3c2ca8e
update tests
alexcos20 Mar 3, 2025
4b31342
change URL test file
alexcos20 Mar 3, 2025
9b3d949
fix: tests
AdriGeorge Mar 3, 2025
4aff0ca
Merge 9b3d9496ed8995df9b5c8eb810306c9537071837 into a7238a14142ae140c…
ahmedraza118 Mar 3, 2025
b98b314
Updating CodeExamples.md
Mar 3, 2025
d473485
Updating ComputeExamples.md
Mar 3, 2025
1b7ac5d
fix: fix
AdriGeorge Mar 3, 2025
7bca93b
Merge 1b7ac5d435939dd08209ecbf16b4554ae8a79a87 into a7238a14142ae140c…
ahmedraza118 Mar 3, 2025
822c0b6
Updating CodeExamples.md
Mar 3, 2025
f7b3f6e
fixed: test coverage using c8 package insted of nyc
ahmedraza118 Mar 3, 2025
25afb7e
fixed: in test:cover and integration (--import insted of --loader)
ahmedraza118 Mar 3, 2025
0dc0409
fixed: unit:cover and integration:cover in testing
ahmedraza118 Mar 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"ignorePatterns": ["dist/**/*"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ jobs:
bash -x start_ocean.sh --with-provider2 --no-dashboard --with-c2d 2>&1 > start_ocean.log &
- run: npm ci
- run: npm run build:metadata
- name: Delete default runner images
run: |
docker image rm -f node:18
docker image rm -f node:18-alpine
docker image rm -f node:20
docker image rm -f debian:10
docker image rm -f debian:11
docker image rm -f moby/buildkit:latest
- name: Wait for contracts deployment and C2D cluster to be ready
working-directory: ${{ github.workspace }}/barge
run: |
Expand Down
8 changes: 8 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"require": ["source-map-support/register", "mock-local-storage"],
"extension": ["ts"],
"timeout": 200000,
"bail": true,
"exit": true,
"fullTrace": true
}
9 changes: 5 additions & 4 deletions CodeExamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Start by importing all of the necessary dependencies
import fs from 'fs'

import { ethers, providers, Signer } from 'ethers'
import { SHA256 } from 'crypto-js'
import crypto from 'crypto-js'
import { homedir } from 'os'
import {
approve,
Expand Down Expand Up @@ -109,8 +109,9 @@ import {
getEventFromTx,
DDO,
LoggerInstance
} from '@oceanprotocol/lib'
} from '../../src/index.js'
```
const { SHA256 } = crypto

<!--
describe('Marketplace flow tests
Expand Down Expand Up @@ -165,7 +166,7 @@ Next, we define the metadata that will describe our data asset. This is what we
```Typescript
const genericAsset: DDO = {
'@context': ['https://w3id.org/did/v1'],
id: '',
id: 'did:op',
version: '4.1.0',
chainId: 8996,
nftAddress: '0x0',
Expand Down Expand Up @@ -821,7 +822,7 @@ Let's start by using the `setData` method to update the nft key value store with
data
)
} catch (e) {
console.log('e = ', e)
console.log('error = ', e)
assert.fail('Failed to set data in NFT ERC725 key value store', e)
}
```
Expand Down
5 changes: 3 additions & 2 deletions ComputeExamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ Start by importing all of the necessary dependencies
import fs from 'fs'
import { homedir } from 'os'

import { SHA256 } from 'crypto-js'
import { ethers, providers, Signer } from 'ethers'
import {
ProviderInstance,
Expand All @@ -145,8 +144,10 @@ import {
ConfigHelper,
getEventFromTx,
amountToUnits
} from '@oceanprotocol/lib'
} from '../../src/index.js'
```
import crypto from 'crypto-js'
const { SHA256 } = crypto

### 4.2. Constants and variables

Expand Down
Loading