npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@oamo/contracts

v0.2.17

Published

Collection of Solidity Smart-Contract used by Oamo.io

Downloads

67

Readme

Oamo - Smart-Contracts

License: MIT npm

Table of contents

General info

This repository is composed of the Smart Contracts that are used by the Oamo. There is currently 2 main Smart Contracts:

  • DataPool.sol: ERC721 contract that represent the ownership of a data pool. (non transferable)
  • Vault.sol: Contract receiving and distributing rewards to participants of a data pool.

This repository also include many tests for the Smart Contracts, the tests are written using Foundry and Hardhat.

The Smart Contracts are intended to be deployed on the Polygon Network.

  • DataPool: 0x33AA4Cf440e8d2A1c37A5aD7be356E1ffB28F76d

  • Vault: 0x8c07df06DED7D71A71E776425ff905c10f558D2A

  • Multi-Sig Wallet: 0x05a0F169084836C68a85E55DF8d61F2fEbe881fb (Owning the Admin Proxy and Admin Role on both Smart Contracts)

Functionality

The main functionality of the Smart Contracts are the ability to create Data Pool and participate in them. To create a new Data Pool or participate in them, the transaction must be first signed by an Oracle. The Oracle is a trusted third party that is responsible for verifying the validity of the transaction and signing it. The Oracle has also the capability to execute the transaction.

Each Data Pool is represented as a NFT, that been said the functionality to transfer the ownership of the NFT has been disabled.

To be completed

More detail to come

Security

The 2 main Smart Contracts in this repository (DataPool and Vault) are intended to be deployed as Upgradeable Smart Contracts. Using the OpenZeppelin Transparent Proxy pattern, the upgradeability is achieved by using a Proxy contract that delegates all calls to an implementation contract. The implementation contract can be upgraded by the owner of the AdminProxy contract.

To ensure the security of the upgradeability mechanism, the AdminProxy contract is owned by a MultiSig wallet. The MultiSig wallet is controlled by 5 owners and a threshold of 3 signatures is required for any transaction to be executed.

Both Smart Contracts also use a system of roles to restrict access to certain functions. The roles are managed by the AccessControl contract from OpenZeppelin. The 2 roles currently in use by both smart contracts are:

  • Admin: Can assign or remove role to other addresses
  • Oracle: Can approve or execute createDataPool and participate functions

The Admin role is assigned to the same MultiSig wallet that owns the AdminProxy contract.

To be implemented The Oracle role is assign to a separate MultiSig wallet that is controlled by 3 owners, with a threshold of 2 signatures required for any transaction to be executed.

Setup

Install Dependencies

yarn install

Run test with Hardhat

npx hardhat test

List all Hardhat tasks

npx hardhat help

Run test with Foundry

forge test

Documentation