# @devprotocol/protocol-v2

> Securitize for Internet assets

Latest version **0.5.1** (published 2024-09-05) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install @devprotocol/protocol-v2
pnpm add @devprotocol/protocol-v2
yarn add @devprotocol/protocol-v2
bun add @devprotocol/protocol-v2
```

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.5.1 |
| Published | 2024-09-05 |
| First published | 2021-10-26 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 44 KB |
| Known vulnerabilities | 0 (+25 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 69 |
| Author | aggre |
| Maintainers | yashagrawal2298, kazu80, _stu, shubhamkukreti, matteusan, aggre |

## Links

- npm: https://www.npmjs.com/package/@devprotocol/protocol-v2
- Repository: https://github.com/dev-protocol/protocol
- Homepage: https://github.com/dev-protocol/protocol#readme
- Issues: https://github.com/dev-protocol/protocol/issues
- npm.io page: https://npm.io/package/@devprotocol/protocol-v2

## Dependencies (3)

- [@openzeppelin/contracts](https://npm.io/package/@openzeppelin/contracts.md) 4.3.2
- [@devprotocol/util-contracts](https://npm.io/package/@devprotocol/util-contracts.md) 3.3.0
- [@openzeppelin/contracts-upgradeable](https://npm.io/package/@openzeppelin/contracts-upgradeable.md) 4.3.2

## Recent versions

- 0.5.1 (latest) — 2024-09-05
- 0.6.0 — 2023-01-12
- 0.5.0 — 2021-10-26

## README

![Dev Protocol](https://raw.githubusercontent.com/dev-protocol/protocol-v2/main/public/asset/logo.png)

[![CI Status](https://github.com/dev-protocol/protocol-v2/workflows/Node/badge.svg)](https://github.com/dev-protocol/protocol-v2/actions)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

# Dev Protocol

This repository is the place to develop smart contracts for Dev Protocol.

- Whitepaper: https://github.com/dev-protocol/protocol/blob/main/docs/WHITEPAPER.md
- ホワイトペーパー(日本語): https://github.com/dev-protocol/protocol/blob/main/docs/WHITEPAPER.JA.md

## How to use

### install

First, install this repository as an npm package.

```bash
> npm i -D @devprotocol/protocol-v2
```

### import

You can use the Dev Protocol interface by importing it from a Solidity file.

```
import {IAddressRegistry} from "@devprotocol/protocol-v2/contracts/interface/IAddressRegistry.sol";
import {IPropertyFactory} from "@devprotocol/protocol-v2/contracts/interface/IPropertyFactory.sol";

contract TestContract {
    function validatePropertyAddress(address _property) external view {
        IAddressRegistry registry = IAddressRegistry(0x0a15Ccf5E6029AaAeBc5F01b09d3C240Dc56c5f9);
        IPropertyFactory propertyFactory = IPropertyFactory(registry.registries("PropertyFactory"));
        require(propertyFactory.isProperty(_property), "not property address");
    }
}
```

This is an example of logic that uses the PropertyFactory contract feature of the Dev Protocol to validate if it is a Property address.

The available interfaces can be found in "node_modules/@devprotocol/protocol-v2/contracts/interface/".

AddressRegistry holds the addresses of the contracts used in the Dev Protocol.

```
AddressRegistry address
arbitrum mainet：0x0a15Ccf5E6029AaAeBc5F01b09d3C240Dc56c5f9
arbitrum rinkeby：0xE75929F46355ad8C5C558755D836364f119BdB22
```

## How to contribute:

Read the [contributing guide](https://github.com/dev-protocol/protocol-v2/blob/main/.github/CONTRIBUTING.md), and create PR when you have time. 🧚✨

## How to setup

Executing the following command will compile each contract.

```
git clone https://github.com/dev-protocol/protocol-v2.git
cd protocol-v2
yarn
yarn generate
```

run the following command to test each contract.

```
yarn test
```

If you use Visual Studio Code, we recommend that you install the following plug-ins:

```
EditorConfig
vscode-eslint
solidity
```

---
_Source: https://npm.io/package/@devprotocol/protocol-v2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
