Skip to content

Crafting example that creates the finest hammers in the land

Notifications You must be signed in to change notification settings

Geeny616/ds-hammer-factory

 
 

Repository files navigation

A Factory That Makes Hammers (in Dawnseekers)

Getting started

This is a forge project, (install foundry)

Once you have foundry, you should be able to run the tests:

forge test

inside the src dir you will find two files:

  • HammerFactory.sol - this is a BuildingKind Extension, Players can call your use function by visiting instances of the BuildingKind on the map
  • HammerFactory.js - this is a client plugin that will be loaded when Players visit instance of the BuildingKind, use it to show UI for calling the use function

How to deploy

Find the address of the game contract....

Visit http://localhost:8080/ and execute this query:

query {
  game(id: "DAWNSEEKERS") {
    id
  }
}

The returned id is the game address.

Deploy the BuildingKind extension and plugin, substituting the correct game id you found above:

GAME_ADDRESS=0x1D8e3A7Dc250633C192AC1bC9D141E1f95C419AB forge script script/Deploy.sol --broadcast --verify --rpc-url "http://localhost:8545"

About

Crafting example that creates the finest hammers in the land

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 74.2%
  • JavaScript 13.6%
  • Shell 9.7%
  • Dockerfile 2.5%