Official0xygen MetaMask NFT Integration
Plug-in Documentation

0xG copy 5.2.png
 

Quickstart Demo:

  1. REQUIRED: None.

  2. Navigate to:

  3. Follow the brief directions there and return here when you're done!

  1. OPTIONAL: If you want to test with your own demo gamer account you can:​​

  • Connect your MetaMask Wallet

  • Click safeMint, copy-paste your public MetaMask address.

  • Click Write. There will be a small Ethereum Network gas fee to mint the sample NFT. If you do not wish to pay the fee charged by the Ethereum Network, you can use the demo account info from the Github link.

 

connect.PNG
safeMint.PNG
 
 
cog background (1).png

Gamer Account Creation Process:

  1. Navigate to: https://www.portal.0xygen.io/register and sign up with a new unique Username, Email and secure password.

p1.png

2. User will be prompted to login with the new account then will be taken to a simple dashboard:

p3.png
p2.png

3. Clicking the CONNECT TO METAMASK button in the web portal will open a Signature Request in your Metamask browser extension to verify your account.

p5.png

4. After you or the gamer links a wallet, it will show the wallet address in the simple Dashboard.

p6.png

Prerequisites for your own smart contract:

  1. REQUIRED: An Ethereum Mainnet NFT Contract that has the following properties:

    • IERC-721: All ERC-721 compliant NFT contracts contains contain this core functionality.

    • IERC721Metadata: Almost every contract will contain this functionality.

    • IERC721Enumerable: Many contracts will contain this and it is needed for retrieving tokens contained in a gamer’s wallet.

  2. REQUIRED: A set of API keys, which can be provided at the sole discretion of Team 0xygen [support@0xygen.io]. Projects will be vetted and you may be asked to verify contract ownership.

  3. RECOMMENDED: For testing purposes, it is recommended that you have a Metamask wallet with browser extension installed (https://metamask.io/) that owns at least one NFT from your collection.

Interacting with Unreal Engine Blueprints:

p7.png

1. Let’s start by Using the Synch Wallet and Verify Wallet nodes to log in the user account we just created!

p8.png

2. Make sure to add a slight delay to allow the server to verify the Wallet

3. Add a branch. If False, we will not proceed as the Email and password do not match:

p9.png

If True, we will then proceed to sync the metadata for the gamer’s account.

p10.png

4. Let’s next use the Get Metadata and Process Metadata nodes to obtain the gamer’s NFTs for your contract!

             A. Create an Array of Strings var named Users and add the email address for the account we just created

             (for testing purposes).

p11.png

             B. Connect the Users var to Users input and enter Api Key.

             Note: Api Keys are provided by Team 0xygen who can be reached at: dev@0xygen.io

p12.png

5. Make sure to add a delay of 5-7 seconds, as this node is querying the blockchain and we need to allow for the blockchain to respond.

p13.png

6. Create a Process Metadata node and connect the pins as shown.


7. The below blueprint will allow you to use the Build Metadata Map node. The For Each Loop will process the metadata for all NFTs owned by the user! Of course, there are many other possible ways to obtain just the first NFT, or a specific NFT.

Note: More tutorials will be provided soon.

p14.png

8. From the Build Metadata Map node you can look up any NFT variable present in the json metadata for your ERC-721 NFT contract!

p15.png

9. In this example I am calling the tokenId trait and Eyes trait for two NFTs I own:

p16.png
p17.png

10. Output is below, but these traits can easily be mapped to .fbx files and more as implementation is truly flexible!

p18.png
 

The 0xygen Team is here to help and discuss with your team if 0xygen is the right blockchain tool for your project. 

 

EMAIL: support@0xygen.io

Connect with us in our Q and A at our Disord.

Connect with us at the Official0xygen Twitter. 

Blank 1080 x 1920 copy.png
  • Twitter