Skip to content

Commit

Permalink
βš—οΈπŸ“Ÿ ↝ Found source of error in prev commit & fixed it
Browse files Browse the repository at this point in the history
The frontend view currently only allows staking to be done if the player has an NFT from the planets collection. This should be improved where the staking (aka helper/planetHelper) contract also has this require function.

As per the [Star Sailors Web Flow Demo](https://www.notion.so/Star-Sailors-Web-Flow-Demo-d2b9180a577144f9a523e045d429076a) roadmap, we need to determine what is actually being staked (multiple nft collections at a time?) β†’ the planet, the multitool, or something else?

For Signal-K/sytizen#18 & Signal-K/sytizen#6

Notion: https://skinetics.notion.site/Planet-Mining-multitool-8310fa1cd188440688bbcc19692b3b67
  • Loading branch information
Gizmotronn committed Jan 16, 2023
1 parent b4fd8fe commit 24fc297
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stake/frontend/components/CurrentGear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function CurrentGear ({ // Shows the currently equiped planet cha
marginTop: 24
}}
>
<img src='../assets/mine.gif' height={64} alt='planet-mining' />
<img src='./mine.gif' height={64} alt='planet-mining' />
<GameplayAnimation multitool={multitool} />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion stake/frontend/components/GameplayAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from '../styles/Gameplay.module.css';
import { NFT } from "@thirdweb-dev/sdk"; // Replaces edition drop metadata tag req.

const Minerals = (
<div className={styles.slide}><img src='../assets/mineral.png' height='48' width='48' alt='mineral' /></div>
<div className={styles.slide}><img src='./mineral.png' height='48' width='48' alt='mineral' /></div>
);

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion stake/frontend/components/MintContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function MintContainer() {
<h1>Edition drop</h1>
<p>Claim your planet NFT to start playing</p>
<div className={`${styles.nftBox} ${styles.spacerBottom}`}>
<img src='../assets/mine.gif' style={{ height: 200 }} />
<img src='./mine.gif' style={{ height: 200 }} />
</div>
<Web3Button contractAddress={PLANETS_ADDRESS}
action={() => {
Expand Down
3 changes: 2 additions & 1 deletion stake/frontend/constants/contractAddresses.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const HELPER_ADDRESS = '0xA324960848a42Ef7664C0681207B42FDAA437Ac5'; // custom contract
export const HELPER_ADDRESS = '0xcf05AB21cAa609c81D6DfF435F0F8808A05EA264'; // custom contract
// 0xcf05AB21cAa609c81D6DfF435F0F8808A05EA264 is deployed from the correct wallet, but has a problem - it points to the Planets contract as the multitools contract (i.e. the planets are both the required nft and the nft that is being staked. This could be implemented in future...but for now we need to fix this. So I've redeployed it on a new address (see above line) with the correct pointer). See https://skinetics.notion.site/Planet-Mining-multitool-8310fa1cd188440688bbcc19692b3b67. Derived from https://thirdweb.com/0xCdc5929e1158F7f0B320e3B942528E6998D8b25c/PlanetHelper/1.0.1?via=/goerli/0xcf05AB21cAa609c81D6DfF435F0F8808A05EA264
export const MULTITOOLS_ADDRESS = '0xF846D262EeBAFbfA79017b43aBb0251F740a0619';
export const PLANETS_ADDRESS = '0xdf35Bb26d9AAD05EeC5183c6288f13c0136A7b43'; // edition drop (erc1155)
export const MINERALS_ADDRESS = '0xE938775F4ee4913470905885c9744C7FAD482991';
2 changes: 1 addition & 1 deletion stake/frontend/pages/play.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function Play() {
/>
<Rewards
helperContract={helperContract}
rewardContract={rewardsContract}
rewardsContract={rewardsContract}
/>
</div>
) : ( // Contracts are still loading in
Expand Down
File renamed without changes
Binary file added stake/frontend/public/mineral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 24fc297

Please sign in to comment.