The CryptoKitties bridge allows users to transfer a NFT representing a cat from one chain to another. It demonstrates the ability to perform operations with NFTs through the Arbitrary Message Bridge (AMB), which is part of the TokenBridge project.
In the demos, we deploy contracts and then transfer an NFT between 2 testnets, Sokol and Kovan.
Deployed on Kovan:
CryptoKitties contract (KittyCore) similar to the original CryptoKitties
A mediator contract (ForeignMediator). Kovan is called the foreign bridge in this scenario
Deployed on Sokol:
A modified version of CryptoKitties which can mint a new cat with the same specified metadata (SimpleBridgeKitty)
A mediator contract (HomeMediator). Sokol is called the home bridge. Only the mediator contract communicating with the AMB is allowed to mint a cat.
KittyCore: ERC721 Token Contract for CryptoKitties (approximate replica of original CryptoKitty contract). Includes all functions that create a Kitty with unique attributes including ID, ownership, and metadata.
ForeignMediator: Token management contract that confirms transaction correctness, locks/unlocks transferred Kitties, and sends requests to mint Kitties on Sokol side.
HomeMediator: Token management contract that confirms transaction accuracy, processes and sends token mint and burn requests, and sends requests to unlock cats on Kovan side.
SimpleBridgeKitty: Contract that creates a cat with identical attributes (id, ownership, & metadata) to the cat locked in the Kovan mediator contract. Cats can only be minted through a request from the Sokol mediator contract.