メインコンテンツまでスキップ

v1

v1 contracts are running on L1

v1 address information

How to use

First, install this repository as an npm package.

Install

> npm i -D @devprotocol/protocol

Import

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

import {IAddressConfig} from "@devprotocol/protocol/contracts/interface/IAddressConfig.sol";
import {IPropertyGroup} from "@devprotocol/protocol/contracts/interface/IPropertyGroup.sol";

contract TestContract {
/**
* @dev validates property address.
* @param _property Property address for validation check
* Network: Ethereum Mainnet
* Address: 0x1D415aa39D647834786EB9B5a333A50e9935b796
*/
function validatePropertyAddress(address _property) external view {
IAddressConfig addressConfig = IAddressConfig(0x1D415aa39D647834786EB9B5a333A50e9935b796);
IPropertyGroup propertyGroup = IPropertyGroup(addressConfig.propertyGroup());
require(propertyGroup.isGroup(_property), "not property address");
}
}
Open in Remix

This is an example of logic that uses the PropertyGroup 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/contracts/interface/".

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

AddressConfig address
mainnet:0x1D415aa39D647834786EB9B5a333A50e9935b796
Ropsten:0xD6D07f1c048bDF2B3d5d9B6c25eD1FC5348D0A70