Skip to main content

Transfer container lease ownership

This guide provides a comprehensive overview of how to transfer ownership of a container lease from one user to another, ensuring the original owner no longer has access.

Prerequisites

Before starting, make sure you have completed the following:

Process overview

Transferring container lease ownership consists of two main steps:

  1. The current owner creates a transfer offer.
  2. The new owner accepts that transfer offer.

Step 1: Create a transfer offer

To successfully create a transfer offer, the current lease owner should follow these steps:

  1. Locate the DIRECTORY_CHAIN_RID:
    Use the explorer to find the DIRECTORY_CHAIN_RID, which is needed to identify the relevant blockchain.

  2. Obtain the ECONOMY_CHAIN_RID:
    Execute the following command to retrieve the ECONOMY_CHAIN_RID for the directory chain:

    chr query --blockchain-rid ${DIRECTORY_CHAIN_RID} get_economy_chain_rid
  3. Issue the transfer offer:
    Run the command below to create the transfer offer for the container lease:

    chr tx --blockchain-rid ${ECONOMY_CHAIN_RID} --evm-auth ${CURRENT_OWNER_EVM_ADDRESS} \
    offer_container_lease_ownership_transfer ${CONTAINER_NAME} ${NEW_OWNER_ACCOUNT}

    Be sure to replace the placeholders with the appropriate values:

    • ${ECONOMY_CHAIN_RID}: The blockchain RID of the economy chain you obtained earlier.
    • ${CURRENT_OWNER_EVM_ADDRESS}: The EVM address of the current owner for authentication purposes.
    • ${CONTAINER_NAME}: The name of the lease container being transferred.
    • ${NEW_OWNER_ACCOUNT}: The FT4 account ID of the new owner who will receive the lease.
  4. Verify the transfer offer:
    Once the command executes, confirm the transfer offer was created successfully by checking the status on the corresponding blockchain explorer.

Step 2: Accept the transfer offer

The new owner must now accept the transfer offer by following these steps:

  1. Execute the acceptance command:
    The new owner should run the following command:

    chr tx --blockchain-rid ${ECONOMY_CHAIN_RID} --evm-auth ${NEW_OWNER_EVM_ADDRESS} \
    accept_container_lease_ownership_transfer_offer ${CONTAINER_NAME}

    Replace the placeholders as follows:

    • ${ECONOMY_CHAIN_RID}: The blockchain RID of the economy chain.
    • ${NEW_OWNER_EVM_ADDRESS}: The new owner's EVM address for authentication.
    • ${CONTAINER_NAME}: The name of the lease container.
  2. Confirm the acceptance:
    After executing the command, verify that the transfer of ownership was successful. Check the transaction status using the blockchain explorer.

Error recovery

If a mistake occurs during the transfer process, the current owner can remove the erroneous transfer offer and start anew by executing:

chr tx --blockchain-rid ${ECONOMY_CHAIN_RID} --evm-auth ${CURRENT_OWNER_EVM_ADDRESS} \
remove_container_lease_ownership_transfer_offer ${CONTAINER_NAME}

Ensure to replace the placeholders as needed:

  • ${ECONOMY_CHAIN_RID}: The blockchain RID of the economy chain.
  • ${CURRENT_OWNER_EVM_ADDRESS}: The current owner's EVM address for authentication.
  • ${CONTAINER_NAME}: The name of the lease container.