AEI Smart Contract is written in Solidity using ERC721 standard (NFT) and can be use with Ethereum Clients. It is compatible with FIWARE-Canis Major Adaptor to store the data in blockchain. AEI, asset, events (metadata), relationship, is designed to store the NGSI-LD model with the help of Canis Major Adaptor.
- Entity/Asset with a unique identity will be a new asset (1:1 mapping of asset to an identity).
- Event or Metadata of the asset/entity has a 1:n mapping.
- An Asset can have a 1:n relationship with any other asset.
To Store the NGSI-LD model there are few possibilities with the help of some supported storage type:
- IPFS
- IOTA MaM
- MerkleRoot
- createAsset(bytes32 uuid, string memory _newHash)
- getAsset(bytes32 uuid)
- updateAsset(bytes32 uuid, string memory _newHash)
- removeAsset (bytes32 uuid)
- isValidAssetEthMessage(bytes32 uuid, bytes32 _messageHash, bytes memory _signature)
- addRelation(bytes32 uuid, bytes32 reluuid)
- getRelations(bytes32 uuid)
- removeRelation(bytes32 uuid, uint index)
- isValidRelation(bytes32 uuid, uint index, bytes32[] memory _proof, bytes32 _leaf)
- addMetadata(bytes32 uuid, string memory _metadatahash)
- getMetadatas(bytes32 uuid) public view returns (string[] memory)
- removeMetadata(bytes32 uuid, uint index)
Apart from that ERC721, Ownable, MerkleProof, ECDSA methods are supported.
This project uses:
- truffle
- NodeJS
- Ganache-CLI (testrpc)
- OpenZeppelin
AEI Contract is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
© 2021 FIWARE Foundation e.V.