Identity smart contract using ERC 725

1 answers
1 votes
Identity smart contract using ERC 725

Hi All,
I am trying to create an identity smart contract using ERC 725 and getting an error while trying to compile it. Initially I tried to create in a separate solidity file I was getting import error most of the time while trying to do the compilation. Due to this I am doing it on the base ERC725.sol file. I am adding my own contract in this file after the main contract. This is the code which i was trying to add


pragma solidity ^0.6.0;

// modules
import “./ERC725X.sol”;
import “./ERC725Y.sol”;

* @title ERC725 bundle
* @dev Bundles ERC725X and ERC725Y together into one smart contract
* @author Fabian Vogelsteller
contract ERC725 is ERC725X, ERC725Y {

* @notice Sets the owner of the contract
* @param _newOwner the owner of the contract.
constructor(address _newOwner)
public {}

// NOTE this implementation has not by default: receive() external payable {}

contract myERC725 is ERC725,ERC721{

address public owner;
mapping(uint => identity) identity_id;

struct identity {

string hash;
string filename;

uint aadhar_id;
string name;
uint160 age;
string blood_group;

string city;
string state;
string country;


identity id;

constructor() ERC725(“0x5B38Da6a701c568545dCfcB03FcB875f56beddC4”) public{

owner = msg.sender;


modifier isOwner() {

require(msg.sender == owner, “Access is not allowed”);



function setDetails(uint _aadhar_id,string memory _name,uint160 _age,string memory _blood_group, string memory _city,string memory _state,string memory _country) public isOwner{

_mint(msg.sender,_aadhar_id); = _name;
id.age = _age;
id.blood_group = _blood_group; = _city;
id.state = _state; = _country;


//function getFile(uint _index) public view returns(string memory,string)

function getDetails(uint _aadhar_id)public view returns(string memory _hash,string memory,uint160,string memory,string memory,string memory,string memory){

identity memory id = identity_id[_aadhar_id];



The error which I was getting was:

Declaration error : Identifier not found or not unique. contract my ERC725 is ERC725,ERC721 {..

I am not sure whether I am doing it in the right way. Could anyone please guide me on this. it will help me a lot. thanks.


newest most voted
Hungry for knowledge?
New guides and courses each week
Looking to invest?
Market data, analysis, and reports
Just curious?
A community of blockchain experts to help

Get started today

Already have an account? Sign In