Data Flow and Interactions

SafleID contracts are designed to facilitate various functionalities through a series of well-defined methods. Below is an explanation of the key functionalities provided by the SafleID system:

Registration Functionalities (RegistrarMain Contract)

  1. Register SafleID: This method registers a SafleID corresponding to a provided wallet address.

    function registerSafleId(address _userAddress, string memory _safleId) public
    
    • Parameters: _userAddress - The address of the user. _safleId - The desired SafleID.

    • Purpose: Enables users to create a new SafleID linked to their wallet address.

  2. Update SafleID: This method updates an existing SafleID mapped to a wallet address.

    function updateSafleId(address _userAddress, string memory _newSafleId) public
    
    • Parameters: _userAddress - The address of the user. _newSafleId - The new SafleID to be updated.

    • Purpose: Allows users to change their existing SafleID to a new one.

  3. Map Other Coins: This method enables the linking of wallet addresses from other blockchains to the SafleID.

    function mapCoins(uint256 _indexnumber, string calldata _blockchainName, string calldata _aliasName) external returns (bool)
    
    • Parameters: _indexnumber - The index number for mapping. _blockchainName - The name of the blockchain. _aliasName - The alias for the coin.

    • Purpose: Facilitates multi-chain support by allowing users to map other blockchain addresses to their SafleID.

  4. Register Coin Address: This method links a wallet address on another blockchain to the SafleID.

    function registerCoinAddress(address _userAddress,uint256 _index, string calldata _address) external returns (bool)
    
    • Parameters: _userAddress - The address of the user. _index - The index for the coin. _address - The wallet address on the other blockchain.

    • Purpose: Allows users to link addresses from other blockchains to their SafleID.

  5. Update Coin Address: This method updates the address mapped to a SafleID on a specific blockchain.

    function updateCoinAddress(address _userAddress,uint256 _index, string calldata _address) external returns (bool)
    
    • Parameters: _userAddress - The address of the user. _index - The index for the coin. _address - The new wallet address.

    • Purpose: Enables users to update their linked addresses on other blockchains.

Last updated