npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

spacexcalibur-contracts

v1.3.0

Published

[![GitHub](https://img.shields.io/github/license/ethlisboa/space-contracts)](LICENSE) ![GitHub top language](https://img.shields.io/github/languages/top/ethlisboa/space-contracts) ![Lines of code](https://img.shields.io/tokei/lines/github/ethlisboa/space-

Downloads

3

Readme

SpaceXcalibur Contracts

GitHub GitHub top language Lines of code Amazing! Discord

The optimistic Solidity smart contracts for SpaceXcalibur.

  • Install with npm install
  • Test with npx hardhat test
  • Deploy to local network with npx hardhat deploy --network localhost
  • Deploy to Optimistic Kovan testnet with npx hardhat deploy --network optimistic

Architecture

The game map contains "celestials" (celestial objects). Each kind of celestial object is managed by a contract. The contract hierarchy is:

  • Celestial - common ancestor for all celestials
    • ResourceCelestial - ancestor for celestials that generate resources to be collected
      • Planet - generates terrestrial wood

The contract for a specific kind of celestial (e.g. Planet) stores the data for all celestials of that particular kind. It also lets player interact with the celestial. In the case of Planet, the player can build an extractor on the planet (to generate terrestrial wood) and then collect the accrued wood at a later point in time.

The Items contract implements EIP-1155 (multi-tokens) and holds player balances for every resource and items in the game.

The Galaxy contract lists all existing celestials — it's used to load the game map for players. These celestials are not indexed in any way, their attributes are stored in the contract for their specific kind.

Events

  • event Build(uint128 x, uint128 y, address player, CelestialKind kind);
    • signature: Build(uint128, uint128, address, uint8)
    • emitted whenever a building is built on a celestial (currently: building extractors on resource celestials)