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)) 2021 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.0a16.tar.gz (172.7 kB view hashes)

Uploaded Source

Built Distribution

ocean_contracts-1.0.0a16-py3-none-any.whl (198.1 kB view hashes)

Uploaded Python 3

Supported by

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