Interfaces
What is Interfaces?β
Provides interfaces for the main Dev Protocol contracts in Solidity.
Source | |
---|---|
npm | https://www.npmjs.com/package/@devprotocol/protocol |
GitHub | https://github.com/dev-protocol/protocol |
Usageβ
You can install it with npm or yarn and import it within your project.
Install from npm.
npm i @devprotocol/protocol
Or, use yarn.
yarn add @devprotocol/protocol
Exampleβ
import {IAddressConfig} from "@devprotocol/protocol/contracts/interface/IAddressConfig.sol";
import {IPropertyGroup} from "@devprotocol/protocol/contracts/interface/IPropertyGroup.sol";
contract Demo {
function validatePropertyAddress(address _property) external view returns(bool) {
IAddressConfig addressConfig = IAddressConfig(0x1D415aa39D647834786EB9B5a333A50e9935b796);
IPropertyGroup propertyGroup = IPropertyGroup(addressConfig.propertyGroup());
retrurn propertyGroup.isGroup(_property);
}
}