Contract Ownership & No Lock-In

Overview

One of the most common questions we get from larger scale game publishers and developers building on MetaFab is: "who has ownership and control of the underlying smart contracts on the blockchain that are deployed for the systems I use?" The short answer is - you own and control your deployed contracts.

Contract Ownership

All of the smart contracts for your game's systems are automatically deployed to the blockchain by the primary managed wallet tied to your game's account. You have control over this managed wallet due to the encryption pattern MetaFab uses to secure managed wallets. This makes it impossible for MetaFab to decrypt and access managed wallets without the owner's account walletDecryptKey being provided in API requests.

For testing and playing around with MetaFab APIs, this ownership and control pattern works great. However, once you've deployed MetaFab's systems in a production environment you may want to transfer ownership of your smart contracts to a wallet address only you hold the private keys for.

MetaFab makes it extremely easy, without any service interruption, to transfer ownership and administrative control of your contracts to an external wallet (EOA) that you control. You can do this through the contract ownership transfer endpoint, here.

Transferring ownership of any deployed MetaFab contracts performs the following operations.

  • Revokes contract administrative privileges from your managed wallet.
  • Transfers contract ownership and grants administrative privileges to the new wallet. Only wallets with administrative privileges can assign and revoke other administrative and manager roles for your contract, giving you full control.
  • Retains a manager role for your managed wallet, allowing you to still use the MetaFab APIs to interact with your contract.

No Lock-In

If for any reason you want to leave the MetaFab ecosystem but retain control and usage of your contracts, you're able to do that. We do not lock you into our systems or APIs.

You can eject out of MetaFab's services and retain control of your deployed contracts by taking the following steps.

  • Transfer ownership of your contracts to a wallet address you control using the contract ownership transfer endpoint.
  • After transferring ownership, from the new owner wallet perform a revokeRole transaction on your contract and revoke the manager role from your MetaFab game's managed wallet address. The bytes32 hash for this role is 0x5b618ab2fee761c09bf71319707cefa62eccc93dcc483744898e6c3acf452643.
  • Interactions through MetaFab's APIs for any contracts that have had the manager role revoked from your managed wallet will no longer work. At this point, you've fully ejected your contracts from MetaFab.