/seascape-smartcontracts

Seascape smartcontracts

Primary LanguageSolidityGNU General Public License v3.0GPL-3.0

Crowns, Seascape NFT and game smartcontracts on Seascape Platform

Smartcontracts for https://seascape.network/ – a platform for games. It's developed by truffle framework. For more in-depth explanation, please visit https://docs.seascape.network/

Contract addresses

Ethereum mainnet network

Binance Smart chain network

Rinkeby test network

Binance Smartchain test network

Moonbase (Moonbeam on Polkadot) Alpha test network

Audit

The Crowns, Seascape NFT and Profit Circus were audited by Certik.

The details of all contract audits can be seen at Certik Security Leaderboard - Seascape

This repository depends on the following submodules:

  • crowns - an ERC-20 token used as a in-game token of Blocklords. Strategy game on ethereum at https://blocklords.io

Running up on your machine

Pull this repository into your machine.

Inside the folder, fetch the git submodules, Crowns (CWS) is fetched as a submodule, and other smartcontracts depends on Crowns:

git submodule update --init --recursive

Then, we need to setup truffle as a global module:

npm install -g truffle

Then, we need to update the local dependencies:

npm install

Ccompile the contracts to generate ABI interfaces of smartcontracts, to use in the scripts: truffle compile

Finally, edit the truffle-config.js by setting up your network credentials including your Private Key and RPC node endpoint.

Done, check the tests, migrations and scripts. Edit them to set correct smartcontract address before using them. Especially, if you want to interact with already deployed smartcontracts.

Repository consists the following smartcontracts:

  • contracts/seascape_nft/SeascapeNft.sol – Based on openzeppelin ERC721 library. This NFT is burnable, owns metadata, mintable. However minting option are available through another smartcontract - Nft Factory. Seascape NFT also stores additional properties used in Seascape Network.

  • contracts/seascape_nft/NftFactory.sol – Minting Seascape NFTs. It is using Role permission feature to mint different kind of NFTs.

  • contracts/seascape_nft/NftTypes.sollibrary used in another smartcontracts. It has a quality property of NFTs. Quality is one of the additional data used in Seascape Network.

  • contracts/game_1/LpMining.sol – The goal of the game is to stake uniswap (https://uniswap.org) LP tokens for CWS reward. Staking formula is in the Smartcontract. Also Staking period is going during the Game Session. Optionally: Each player can mint one nft in every game session.

  • contracts/game_2/NftRush.sol – The goal of the game is to spend CWS token to mint Seascape NFTs. More you spend, the higher the quality of the minted Seascape NFT. This game also has a leaderboard. The top ten winners of leaderboard can claim addional tokens.

  • contracts/game_3/NftStaking.sol – The goal of the game is to stake Seascape NFT for CWS reward. When claiming the CWS reward, NFT will be burnt.