Skip to content

Commit

Permalink
🦔🫥 ↣ Add Evolving contract to the Generator [#1] [SCD-6].
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Oct 24, 2022
1 parent 429401b commit 39da03a
Show file tree
Hide file tree
Showing 47 changed files with 13,236 additions and 714 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions .flaskenv

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.gitsigners
.env
.env
.venv
__pycache__
.flaskenv.example
node_modules
19 changes: 0 additions & 19 deletions main.py

This file was deleted.

690 changes: 0 additions & 690 deletions notebook/data/PlanetStats.ipynb

This file was deleted.

41 changes: 41 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "star-sailors-fe",
"version": "1.0.0",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"node-sass": "^7.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.6",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"start-server": "cd server && venv/bin/activate && flask run --no-debugger",
"test-api": "cd server && venv/bin/activate && flask test",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"description": "A web-based frontend for the Star Sailors API (by Signal Kinetics, http://skinetics.tech)",
"main": "index.js",
"repository": "https://github.com/signal-k/sytizen",
"author": "Liam Arbuckle, Signal Kinetics",
"license": "MIT",
"proxy": "http://localhost:5000",
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Binary file added public/favicon.ico
Binary file not shown.
43 changes: 43 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

Binary file added server/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions server/.flaskenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FLASK_ENV=development
FLASK_APP=main.py
SUPABASE_URL=
SUPABASE_KEY=
Binary file added server/Ansible/.DS_Store
Binary file not shown.
Binary file added server/Ansible/Generator/.DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions server/Ansible/Generator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
.env
coverage
coverage.json
typechain
typechain-types

#Hardhat files
cache
artifacts

26 changes: 26 additions & 0 deletions server/Ansible/Generator/contracts/ShipEvolve.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "@thirdweb-dev/contracts/base/ERC1155LazyMint.sol";

contract ShipEvolveContract is ERC1155LazyMint {
constructor(
string memory _name,
string memory _symbol
) ERC1155LazyMint(_name, _symbol, 0) {}

function verifyClaim(
address _claimer,
uint256 _tokenId,
uint256 _quantity // Duplicate for planets, add physical location (updated from unity-side)
) public view override { // Pull this data and export into Supabase through Moralis speedy nodes -> add crafting feature through API and pass into contract-side
require(_tokenId == 0, "Only base spaceship is claimable"); // The first spaceship (ERC1155) is the base model, and can be claimed
require(_quantity == 1, "You can only claim one spaceship at a time"); // However, you can claim multiple spaceships, just over multiple claim transactions
}

function evolve() public {
_burn(msg.sender, 0, 2); // Destroy two of the user's base spaceships to evolve (aka mint) the second spaceship
_mint(msg.sender, 1, 1, ""); // 1 level 2 spaceship for 2 level 1 spaceships
}
}
// Deploy with `npx thirdweb deploy`
12 changes: 12 additions & 0 deletions server/Ansible/Generator/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
};
20 changes: 20 additions & 0 deletions server/Ansible/Generator/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "star-sailors-nft-generator-addon",
"version": "1.0.0",
"description": "Additional parts/components to our NFT generator",
"main": "index.js",
"repository": "https://github.com/signal-k/sytizen",
"author": "Liam Arbuckle, Signal Kinetics PTY LTD",
"license": "MIT",
"scripts": {
"build": "npx thirdweb@latest detect",
"deploy": "npx thirdweb@latest deploy",
"release": "npx thirdweb@latest release"
},
"devDependencies": {
"hardhat": "^2.10.1"
},
"dependencies": {
"@thirdweb-dev/contracts": "^3"
}
}
Loading

1 comment on commit 39da03a

@Gizmotronn
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#6

Please sign in to comment.