Inspiration
Metaverso is the future and we need to think how to integrate different technologies there in order to offer services that can benefit in the real life that's why the reason of this project
What it does
The proof of concept consist in integrate Chainlink tech in the Metaverso to proof the possibility to offer services from there which have effect in the reality, this proof of concepts will have three steps:
- Bot that show a price list of tokens from Avalanche network when the player request it (Data Feeds)
- Same bot by requesting from the player can send tokens to other account from Avalanche to other networks
- 3D game based in Arkanoid called Packtingo that start with 20 boxes and the game will decide randomly which box need to be destroyed to win the game (VRF) and if the player win the game will receive a NFT (FUNCTIONS)
How we built it
I used Blender to design the Metaverso world, Godot for the game engine, Dialogue Manager plugin for the dialogues in the Metaverso with the Bot, Foundry to manage the contracts and test them and Warp rs as backend using Postgres as relational database and Sled to save the nonce of the session and also Warp for rendering the game on Web, Nestjs for the prize-api to execute the function, Tencent Cloud to host the demo and docker compose to run all the services in one. The Chainlink services that I used was, Data Feed to get the price list of the tokens, CCIP to send tokens to other networks, VFR to draw the Box to destroy randomly and Functions to check if player is eligible for the prize
Challenges we ran into
The main challenge and more time consumed was in integrate Ethers to the game because Godot use Gdscript as engine programming language and only offer a bridge where is possible to call javascript api but only methods that are directly under window object for the rest it has an eval method, then I needed to add methods, variable, etc to window object in order to be able to use later, another issue is that to resolve promises, although Gdscript has the keyword await and it is used for the same purpose cannot resolve Javascript Promises then I needed to use callbacks adding more complexity and limiting me in reusing code, also every time that I want to test something I needed to export to the web and and test in a browser because the Ethers lib fails testing in native for missing dependency and it is hard to debug with breakpoints in browser because the logic is transpiled to Wasm then it was consuming a lot of time. Another challenge was adding third javascript lib to the web export which doesn’t support UMD like Siwe, used to create message and verify message signature with wallet, I need to build it for my self to UMD trying different tools until I achieved with Esbuild. Developing the smart contracts was a challenge too because my knowledge in Solidity was limited before start this Hackaton, I didn’t know well how to implement the logic to transfer tokens from one account to another through contract neither many concepts which I was learning during the project, and the same was with Gdscript the programming language of Godot and its plugin Dialogue Manager, long time ago I was just play around with the game engine but never I was starting anything real. Another point to mention is that in the beginning I wanted to do the prize-api using warp rs but the toolkit of chainlink is only provided in JS/TS and creating binding for it consumes a lot of time that’s why I developed using Nestjs
Accomplishments that we're proud of
I’m happy first to integrate blockchain in Metaverso by myself, also to show the possibility to use Chainlink services (Data feed, CCIP, VRF, and Functions) in it and give something useful to users that at the same time bring profits to the Metaverso platform
What we learned
I learned how to implement Data feed, CCIP, VRF, and Functions from Chainlink in a Metaverso in the way that make senses, also now I can create a minimalist games or metaversos and I can develop more complex smart contracts and test them with foundry
What's next for Web 4D Life
For the next step will be:
- Improve 3d design
- Allow to access to the Metaverso from the base url instead of writing also the port 3030
- Add more elements and bots
- Add sounds
- Users can interact each others
- More services and games
- record games in other to check if users didn’t cheat
- Implement microservice to send emails when user win a game
- Add bindings for Chainlink toolkit to be able to use in Rust applications
- Migrate prize-api to Warp rs
- And a lot of more
Built With
- avalanche
- blender
- ccip
- data-feed
- docker
- foundry
- functions
- godot
- nestjs
- nft721
- rust
- solidity
- tencent-cloud
- typescript
- vrf
- warp-rs

Log in or sign up for Devpost to join the conversation.