Game Trade
Buy or sell in-game items with vZOO
This solution allows users to utilize their vZOO tokens to buy or sell in-game items and assets. The game services and game address play a crucial role in facilitating these transactions and providing control over the process.
Please note that 2FA is mandatory for making Game Trade transactions in-game.
This solution can be applied in various scenarios:
Purchasing In-game NFTs (ERC721) with vZOO:
Users can spend a specific amount of vZOO.
A new ERC721 token is minted and transferred to the user.
Purchasing In-game Tokens (ERC20) with vZOO:
Users can spend a certain amount of vZOO.
A new ERC20 token is minted and transferred to the user.
Acting as a middleman for user-to-user trades:
Users can transfer vZOO from User A.
The gameTrade API is called to facilitate the trade.
ERC20 tokens are transferred or burned, and ERC721 tokens are minted or transferred between User B and User A.
The gameTrade API is called again to send the locked amount from User A to User B.
In summary, this solution enables the seamless exchange of vZOO, ERC721 tokens, and ERC20 tokens between users, with 2FA verification ensuring secure and authenticated transactions.
fees are incurred for each transaction on the platform. These fees are automatically deducted to generate additional rewards for players. Check the current fee price there.
GameTrade
Initialize ERC721 before using the token
POST
API_END_POINT_URL/API_KEY/game/trade
SDK Preparation
You need to prepare for SignedSignatureFromPayload by
Installing zoo-game-sdk by npm install zoo-game-sdk
Import SDK by import * as ApiKey from 'zoo-game-sdk/src/auth/apikey/index'
Signing by SDK
let bodyMessage =JSON.stringify(payload);
let hmac = ApiKey.signData(bodyMessage, SEC_KEY);
*Use "hmac" as SignedSignatureFromPayload
Query Parameters
Request Body
You need to keep Token Address for the future usage
The fields "amountUserPay" and "amountUserGot" cannot be defined together. Only one of these fields can be used. If "amountUserPay" is greater than 0, it is not necessary to enter a token (2FA). This scenario is used when sending vZOO from the gameAddress to the user.
Last updated