💡Appendix
This page covers the details of the implementation of Philand.
Create PhiMap Flow
Users need to have the ENS controller. The creation of a new Philand contract is initiated by receiving a "create" message from the Registry contract.
Registry: '0x6532B97295a0728880AE81D5CD7248f32E24e39a', https://polygonscan.com/address/0x6532B97295a0728880AE81D5CD7248f32E24e39a
PhiMap: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908', https://polygonscan.com/address/0xe8b6395d223C9D3D85e162f2cb2023bC9088a908
Philand is implemented as an upgradeable contract using the AccessControlUpgradeable.sol from the OpenZeppelin contracts-upgradeable library.
Map Size
Let's also comment on our map size.
As you can see. when creating a contract, a map of size is set to 8 * 8.
— A smaller PhiLand will fill up quicker, with less objects. Users will feel they have control and agency over their land right from the get-go.
— A smaller land is easier to show off on social media. This is especially important. The higher detailed bigger lands are harder to look good. We don't want a lot of barren Phi Land shots shared on social media. Things should look great quick!
Philand require Object-whitelist
The objects used in PhiMap are required to be registered on the whitelistObject states in Philand. In other words, contracts that are not registered in phimap are not allowed to write.
Freeze method
There is a freeze function in philand that can be used to temporarily stop operations.
Map initialization
Although the frontend does not have a button for executing this function, the contract has a method for initializing a specific philand. This function is only excecuted by ens owner (philand owner)
SmartContract also make Philand.
If a smart contract has ens controller, it can also create philand contracts. it can be managed and operated from the contract. This system allows for multiple user usecases, game features, etc...
https://github.com/PHI-LABS-INC/contract-philand/blob/main/contracts/Ensmap.sol
Last updated