Galaxy Throne
  • Welcome To Galaxy Throne
  • Overview
    • Summary
    • Planets
    • Ships
    • Combat
    • Resources
    • Asteroid Belts
    • Alliances
    • Factions
    • Diplomacy
    • Modules
    • Research
    • Lore
    • Commanders
  • Technical Docs
    • Smart Contracts
    • Account Abstraction
    • On-Chain Automation
  • Ingame Tokens
  • Monetization
  • GTT Tokenomics
  • Roadmap
Powered by GitBook
On this page

Was this helpful?

  1. Technical Docs

Smart Contracts

PreviousTechnical DocsNextAccount Abstraction

Last updated 1 year ago

Was this helpful?

We utilize the Diamond-Pattern for our Smart-Contract Architecture

Our Deployed Contracts are here :

The Game Architecture is stored on the Diamond, which is a Proxy to its Facets. This enables us to have modularized contracts with infinite contract size, with shared storage & upgradability. Saving Gas is just a very nice bonus.

Facets themselves are Feature-Specific Parts of the Game, such as Combat, Ship Crafting, Planets etc.

The Game's storage is using the AppStorage Pattern

For The NFT's, we deploy ERC721/ERC1155/ERC20 Compliant Seperate Contracts which are coupled to the Diamond. In order to enable Patches, we are using the Upgradable Pattern from OpenZeppelin

https://dev.to/mudgen/appstorage-pattern-for-state-variables-in-solidity-3lki
https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable
[Github Repo]
EIP-2535: Diamonds, Multi-Facet ProxyEthereum Improvement Proposals