Edit DDO Fields
Last updated
Was this helpful?
Last updated
Was this helpful?
To edit fields in the DDO structure, DDO instance from DDOManager
is required to call updateFields
method which is present for all types of DDOs, but targets specific DDO fields, according to DDO's version.
NOTE: There are some restrictions that need to be taken care of before updating fields which do not exist for certain DDO.
For e.g. deprecatedDDO
, the update on services
key is not supported, because a deprecatedDDO
is not supposed to store services
information. It is design to support only: id
, nftAddress
, chainId
, indexedMetadata.nft.state
.
Supported fields to be updated are:
Now let's use , DDOExampleV4
into the following javascript code, assuming @oceanprotocol/ddo-js
has been installed as dependency before:
Execute script