Skip to content

Block42World/blockopoly-contracts

Repository files navigation

Block42


Blockopoly World and Land Token Contracts

What's Block42 World

A world is a separated planet, which having number of lands. In Block42 universe, there can be unlimited number of parallel worlds (capped by uint32, i.e. 4.3B, but is way enough). A world is an ERC721 token which can be owned. The owner of first few worlds will be us, and we will give / sell the ownership of world to anyone who are passionate to contribute to Block42 community.

What's Block42 Land

In each world, there's a number of lands. Each land is also an ERC721 token. World creators can create arbitrary number of lands, given the x, y positions, width and height of the land. Positions are capped to be within +/- 1T. Width and height should be under 65k and must be a odd number, to avoid using floating numbers. Lands should not be overlapping each other. A land's uint256 token ID is encoded from (worldId, x, y) and should always be unique. After world creator creating the new land, he can give / sell to anymore. The land owner then can construct voxel buildings and decorations in his own land, using our web app or standalone client. A voting and rewarding system may be introduced in later stage, for incentivizing players who build good content in their lands, as well as prohibiting illegal content.

Getting Started

Requirements

Install dependencies

npm i

Start Ganache CLI to run a local private blockchain, or use GUI Ganache

ganache-cli

Compile the contracts

truffle compile

Deploy contracts to the local environment

truffle migrate

Run test

truffle test

Create flattened scripts (Optional to deploy at Remix)

truffle-flattener contracts/World.sol > contracts_flattened/World.sol
truffle-flattener contracts/Land.sol > contracts_flattened/Land.sol

Contract Address

Kovan

TODO

  • Complete all test cases
  • Add Travis CI badge Build Status
  • Add CoverAlls badge Coverage Status
  • Add maketplace

License

Code released under the MIT License.

About

Block42 world and land ERC721 token contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published