CONTRACTS

Identity & Username

IvyRegistry and IvyUsername: user identity and transferable usernames.


Identity on Ivy is split across two contracts: IvyRegistry (core identity) and IvyUsername (a transferable username, ERC-721).

#IvyRegistry

Address: 0x43522E0aB410246C014359B7F5c55F7a196dddFc

Every account has an ivyId. Useful read functions:

FunctionDescription
ivyIdOf(address) → uint256Wallet to ivyId. 0 means no account.
profileOf(uint256) → ProfileThe full profile (below).
coreOf(uint256) → (address,bool,uint256)wallet, verified, referrerIvyId.
activeUsernameOf(uint256) → uint256Active username token id.
totalSupply() → uint256Total number of accounts.

The Profile struct:

struct Profile {
  uint256 ivyId;
  address wallet;
  string  displayName;
  bool    verified;
  uint256 referrerIvyId;
  uint256 activeUsernameTokenId;
  uint256 lastUsernameChange;
  uint256 createdAt;
}

The verified field matters: interactions such as likes, comments and tips require a verified account.

#IvyUsername (ERC-721)

Address: 0x3a5a665B9D1de5Bf87FC53Ff4Cd712754EEa474a

Usernames are a separate ERC-721 NFT; they are transferable and can be bought and sold through IvyUsernameMarket (proceeds go to the SharePool). To resolve the active username of an ivyId, get the token id with activeUsernameOf(ivyId) and then read the name from IvyUsername.

#Example: wallet to profile

const ivyId = await client.readContract({
  address: "0x43522E0aB410246C014359B7F5c55F7a196dddFc",
  abi: ivyIdOfAbi,
  functionName: "ivyIdOf",
  args: ["0x..."],
});
if (ivyId !== 0n) {
  const profile = await client.readContract({
    address: "0x43522E0aB410246C014359B7F5c55F7a196dddFc",
    abi: profileOfAbi,
    functionName: "profileOf",
    args: [ivyId],
  });
}

Takıldığın bir yer mi var?

Teknik destek, entegrasyon ve ortaklık için ekibe ulaş: info@ivy.live

Identity & Username · Ivy Developers · Ivy