🍁What an easy to build up your metaverse planet in Pirichain!
We know that blockchain systems can support to metaverse systems. And we will show how to easily establish your metaverse planet via Pirichain Smart Scenarios. Of course this model can be transformed to more and more complicated structure. This is the one of simplest model of using metaverse concept.
First system needs to generate the metaverse properties to use. We explained the this structure in below code lines (generateMyMetaVersePlanet). As we see that system will have coordinates such a x and y. And system defined the PSce owner address as a coordinate each place owner. And price has been defined 10 PIRI default.
Second method is key maker because all of operation will be done via buyMetaversePlace Method. It has 4 parameters ;
x: Desired place x coordinate to buy, y: Desired place y coordinate to buy , receiptAddress: new Metaverse place owner address and newamount: Last Price which will defined from new owner.
In explanation of above code lines, If PIRI is sent at the price requested by the owner of the previous commodity universe, the system will automatically sell the place. Otherwise, it will give the warning in Line 30 and the sale will not occur. On the other hand, the smart scenario is a kind of custodian. And sends the relevant amount to the owner of the metaverse location. New owner can change last sell price how much he wants to sell current place.
The former owner can withdraw the PIRI asset arising from the place of sale to his own wallet whenever he wants. Explained in below sample (withdrawMySoldPlacePIRI function).
If you want to see all metaver details , you can use the below code lines (listAllMetaVersePlaces).
You have seen how easily the design and sales operations of the metaverse world on the coordinate plane can be modeled through Pirichain. You can design operations like this or more complex ones very easily and effectively via Pirichain.
Last updated