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.0a25.tar.gz (207.2 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.0a25-py3-none-any.whl (232.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ocean-contracts-1.0.0a25.tar.gz
  • Upload date:
  • Size: 207.2 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.0a25.tar.gz
Algorithm Hash digest
SHA256 5304720828c5f911afce145bb46adc2aaf00ac586608cc60ef5c8dd3bff5bfb1
MD5 ec918b571991b24e9614452d154236d9
BLAKE2b-256 fba43a175314bf3a0fa3fc418ef793166ea9e82970eb7330c9191a8ff568b275

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ocean_contracts-1.0.0a25-py3-none-any.whl
  • Upload date:
  • Size: 232.4 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.0a25-py3-none-any.whl
Algorithm Hash digest
SHA256 a4dea07d33b619523fefe0355f0753e54e356407c9b77da44981c7ab5d705cd0
MD5 3d4065dffe445788bad35856e327b357
BLAKE2b-256 6ab21f831d1d18933daedc8ba3e881e6a20b4676dbe3cc201cee9b5a79b914d1

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