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.0a15.tar.gz (17.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.0a15-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ocean-contracts-1.0.0a15.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ocean-contracts-1.0.0a15.tar.gz
Algorithm Hash digest
SHA256 ceb74d91d19315b09ae2cbcc06fb6d426b32c57c82d0cd88ddc5e279f717894f
MD5 1513f3a0dbad4f0a06f858ee37bceac4
BLAKE2b-256 0dc8f372e56afa629b88e6daf1ae4c03858f98b43802394a5886ab49889ace56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ocean_contracts-1.0.0a15-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for ocean_contracts-1.0.0a15-py3-none-any.whl
Algorithm Hash digest
SHA256 09e2d4409db5ccc3466044038a2110d7f4349f52205ab7795f6ca0f343494b31
MD5 b2d60e064746d3e989263448fd7f3073
BLAKE2b-256 cd4875da2b1e537cdb183477646a59cdb6cd7f7e3d8eb32cb03ee057b8e19482

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