Comment on page
The ports allow you to take items out from your game into the blockchain and back into them
A port is a smart contract that stands at the interface of the game backend and the blockchain. It is managed by an
adminwallet that represents the game admin.
In the design of the port, we aim to satisfy the four main criteria:
- For the player: Help the user stay in control of their tokens. We don't want the tokens locked in the port for some reason or allow abusive game admins to control what gets in or what gets out.
- For the Game backend: Make sure that the users cannot export their items during gameplay sessions. We only want the user to be able to export their tokens if they are not using it.
- Four the player and game backend: We want to link the user id the game uses with the player wallet. this is a multi-sig operation that needs the approval of both parties.
- To the Game contract developers: Make sure that the contract has minimum assumptions about the implementation of the items token. This will help game item tokens have the most flexibility in designing their tokens.
So, the contract has three main functions to interact with:
- bindWallet( ... ): to associate the user account with a wallet. Binding the wallet will be handled by our SDK.
- importToPort( ... ): to import a token from the blockchain to the game.
- exportFromPort( ... ): to export the game item from the game to the blockchain.