Skip to main content

🐳 Ocean Protocol L1 - v4

Project description

banner

contracts-v4

🦑 Smart contracts for Ocean Protocol v4. https://oceanprotocol.com

ocean v4 is part of the Ocean Protocol toolset.

This is in alpha state and you can expect running into problems. If you run into them, please open up a new issue.

📚 Prerequisites

🏄 Quickstart

Features

  • NFT-ize base IP: a new way of representing baseIP, all newly ERC20 DTs are linked to the NFT contract

  • Roles Administration: there are now multiple roles for a more flexible administation both at NFT and ERC20 levels.

  • Safer Staking - Better IDOs: An automated DT staking and vesting contract which helps with initial DT distribution and price stability.

    It also provides a customizable vesting schedule for the publisher.

  • Help Ocean community: if Ocean is not the basetoken, Ocean Community will receive 0.1% swap fee on pools or fixed price exchange

  • Flexible key-value store in the NFT contract : NFT contract can be used to store custom key-value pairs

  • Metadata is also stored in the NFT contract store (even if it still supports Metadata.sol)

  • Marketplace fees flexibility: now any marketplace runner can set more customized fees structure.

  • Multiple NFT template support: the Factory can deploy different types of NFT templates.

  • Multiple ERC20 template support: the Factory can deploy different types of ERC20 templates

Publisher Flow

Interaction flow from Publisher point of view.

Go to publisher flow

Roles Diagram

This is a diagram which shows how roles are handled in the v4.

Go to roles diagram

Functions you will need

Selection of most common functions.

Go to functions

🦑 Development

npm install
npx hardhat node

👩‍🔬 Testing

You can execute all tests with:

# run hardhat node each time you want to test with the current settings
npx hardhat node

npm run test:full
# same thing, but with coverage reporting
npm run test:full:cover

Unit Tests

You can execute unit tests with:

# run hardhat node each time you want to test with the current settings
npx hardhat node

npm run test:unit

Flow Tests

You can execute flow tests with:

# run hardhat node each time you want to test with the current settings
npx hardhat node

npm run test:flow

🏛 License

Copyright ((C)) 2022 Ocean Protocol Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocean-contracts-1.0.0a26.tar.gz (207.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocean_contracts-1.0.0a26-py3-none-any.whl (232.5 kB view details)

Uploaded Python 3

File details

Details for the file ocean-contracts-1.0.0a26.tar.gz.

File metadata

  • Download URL: ocean-contracts-1.0.0a26.tar.gz
  • Upload date:
  • Size: 207.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for ocean-contracts-1.0.0a26.tar.gz
Algorithm Hash digest
SHA256 31d6f7fa21ab2224c1b8dfa0edfec66caa865ea767461388288945fc9760f43d
MD5 ff7f0913af3f9b555a89a16838136ad7
BLAKE2b-256 98f86cff98f3a05a276ccc9a736a7dd5853841de08ac6a1bbe2e2b995ec8512a

See more details on using hashes here.

File details

Details for the file ocean_contracts-1.0.0a26-py3-none-any.whl.

File metadata

  • Download URL: ocean_contracts-1.0.0a26-py3-none-any.whl
  • Upload date:
  • Size: 232.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for ocean_contracts-1.0.0a26-py3-none-any.whl
Algorithm Hash digest
SHA256 9c3230f3c5a77cafd60858b857631c7ffafd0081c969af9e0d1a755c177c666f
MD5 ffb1dda4745d3c9541752cb562f99dac
BLAKE2b-256 10825a6eb2358128e0354e5c3bb2f1a34e71d62701e4859797edfbb4ee32aef7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page