Skip to content

Commit

Permalink
Add first version of demo assets (#2)
Browse files Browse the repository at this point in the history
* add script to generate stubs

* add stub assets

* temporarily deploy to s3 on pull requests

* improve tests

* add tests

* fix meta of fungible tokens

* add python dependency

* add images game a

* add images

* update link to images in metadata files

* update cdn links

* add cover images for swords

* update the docs

* add names for the game a

* add names to the game a

* add names to the game b

* add names to the game a

* add names to the game c

* add names to the game c

* wip

* more fixese

* typo fix

* cleanup

* set assets metadata

* First batch run

* use assets to generate app agents

* fix images

* fix images

* add TODOs

* Game a artifacts

* Game B collection A

* Game B collection B

* Revert "Game B collection B"

This reverts commit 6cbb966.

* Game B Callection B

* Game B Collection C

* Game B Collection D

* Game C Collection A

* Game C Collection B

* Game C Collection C

* Game C Collection D

* Manual modifications for balancing

* Updated Game A

* Game B

* Game C

* openAI API

* cleanup and refactor

* add upscaled game icons

* fixes

* Revert id changes

* Reverted title and description changes

* fixes

* update github ci

---------

Co-authored-by: dvcpull <[email protected]>
Co-authored-by: kehindave <[email protected]>
  • Loading branch information
3 people authored Sep 15, 2024
1 parent 3381a37 commit ee22647
Show file tree
Hide file tree
Showing 624 changed files with 7,906 additions and 330 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/s3_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Upload assets to AWS S3

on:
push:
branches:
- main
branches: [ main ]

jobs:
deploy:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ __pycache__
.ruff_cache

*.egg-info/

deploy/node_modules/
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ The repo contains assets for demo account in TRAIT wallet:
- metadadata of blockchain entities (AppAgents, fungible tokens, NFT Collections, NFT Tokens);
- corresponding images;

These assets are automatically deployed to AWS S3 bucket in GitHub CI workflow.
These assets are automatically deployed to AWS S3 bucket via GitHub CI workflow.
Then assets become available via CDN on `https://trait-wallet-demo-account.trait.tech`.

## Code

This repo also contains the JS code to automatically create AppAgents & Tokens and persist the metadata into the TRAIT blockchain.
This is a good example of programmatical creation of assets in the TRAIT blockchain.
21 changes: 11 additions & 10 deletions aws_s3_assets/game-a/app-agent-a/app-agent-a.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"metadata_id": "demo-app-agent-a",
"title": "Metadata of the demo AppAgent that represents the game Eclipse Legends.",
"description": "Metadata of the demo AppAgent that represents the game Eclipse Legends.",
"traits": {
"named": {
"name": "Eclipse Legends"
},
"tech.trait.wallet.square_icon": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
"metadata_id": "demo-app-agent-a",
"title": "Metadata of the demo AppAgent that represents the game Starlit Horizon.",
"description": "Metadata of the demo AppAgent that represents the game Starlit Horizon.",
"traits": {
"named": {
"name": "Starlit Horizon"
},
"tech.trait.wallet.square_icon": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/app-agent-a/icon_150x150.png"
}
}
}
}
3 changes: 0 additions & 3 deletions aws_s3_assets/game-a/app-agent-a/app-agent-icon.svg

This file was deleted.

Binary file added aws_s3_assets/game-a/app-agent-a/icon_150x150.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 aws_s3_assets/game-a/app-agent-a/original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 15 additions & 14 deletions aws_s3_assets/game-a/fungible-a-a/fungible-a-a.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"metadata_id": "demo-fungible-a-a",
"title": "Metadata of the demo fungible token for the game Eclipse Legends.",
"description": "Metadata of the demo fungible token for the game Eclipse Legends.",
"traits": {
"named": {
"name": "Luminara"
},
"fungible": {
"symbol": "Lux",
"decimals": 12
},
"tech.trait.wallet.square_icon": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
"metadata_id": "demo-fungible-a-a",
"title": "Metadata of the demo fungible token for the game Starlit Horizon.",
"description": "Metadata of the demo fungible token for the game Starlit Horizon.",
"traits": {
"named": {
"name": "Luminara"
},
"fungible": {
"symbol": "LMN",
"decimals": 12
},
"tech.trait.wallet.square_icon": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/fungible-a-a/icon_150x150.png"
}
}
}
}
3 changes: 0 additions & 3 deletions aws_s3_assets/game-a/fungible-a-a/fungible-icon.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 15 additions & 14 deletions aws_s3_assets/game-a/fungible-a-b/fungible-a-b.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"metadata_id": "demo-fungible-a-b",
"title": "Metadata of the demo fungible token for the game Eclipse Legends.",
"description": "Metadata of the demo fungible token for the game Eclipse Legends.",
"traits": {
"named": {
"name": "Echo Gems"
},
"fungible": {
"symbol": "ECHO",
"decimals": 0
},
"tech.trait.wallet.square_icon": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
"metadata_id": "demo-fungible-a-b",
"title": "Metadata of the demo fungible token for the game Starlit Horizon.",
"description": "Metadata of the demo fungible token for the game Starlit Horizon.",
"traits": {
"named": {
"name": "Echo Gems"
},
"fungible": {
"symbol": "ECHO",
"decimals": 0
},
"tech.trait.wallet.square_icon": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/fungible-a-b/icon_150x150.png"
}
}
}
}
3 changes: 0 additions & 3 deletions aws_s3_assets/game-a/fungible-a-b/fungible-icon.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions aws_s3_assets/game-a/fungible-a-c/fungible-a-c.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"metadata_id": "demo-fungible-a-c",
"title": "Metadata of the demo fungible token for the game Starlit Horizon.",
"description": "Metadata of the demo fungible token for the game Starlit Horizon.",
"traits": {
"named": {
"name": "Starlume"
},
"fungible": {
"symbol": "LUME",
"decimals": 12
},
"tech.trait.wallet.square_icon": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/fungible-a-c/icon_150x150.png"
}
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"metadata_id": "demo-nft-collection-a-a",
"title": "Metadata of the demo NFT collection for the game Eclipse Legends.",
"description": "Metadata of the demo NFT collection for the game Eclipse Legends.",
"traits": {
"named": {
"name": "Swords"
},
"tech.trait.wallet.square_icon": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
},
"tech.trait.wallet.nft_collection_listing_image": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
"metadata_id": "demo-nft-collection-a-a",
"title": "Metadata of the demo NFT collection for the game Starlit Horizon.",
"description": "Metadata of the demo NFT collection for the game Starlit Horizon.",
"traits": {
"named": {
"name": "Swords"
},
"tech.trait.wallet.square_icon": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/nft-collection-a-a/nft-collection-a-a/icon_150x150.png"
},
"tech.trait.wallet.nft_collection_listing_image": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/nft-collection-a-a/nft-collection-a-a/listing_512x512.png"
}
}
}
}

This file was deleted.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,66 +1,36 @@
{
"metadata_id": "demo-nft-token-a-a-a",
"title": "Metadata of the demo NFT token for the game Eclipse Legends.",
"description": "Metadata of the demo NFT token for the game Eclipse Legends.",
"traits": {
"named": {
"name": "Long Sword"
"metadata_id": "demo-nft-token-a-a-a",
"title": "Metadata of the demo NFT token for the game Starlit Horizon.",
"description": "Metadata of the demo NFT token for the game Starlit Horizon.",
"traits": {
"named": {
"name": "Blood Reaver"
},
"tech.trait.wallet.square_icon": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/nft-collection-a-a/nft-token-a-a-a/icon_150x150.png"
},
"tech.trait.wallet.nft_token_listing_image": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/nft-collection-a-a/nft-token-a-a-a/listing_512x512.png"
},
"tech.trait.wallet.nft_token_cover_image": {
"image_url": "https://trait-wallet-demo-account.trait.tech/game-a/nft-collection-a-a/nft-token-a-a-a/cover_1920x1920.png"
},
"tech.trait.wallet.nft_token_description": {
"nft_token_description": "This striking sword features a long, sleek blade with a dark metallic sheen, accentuated by glowing red patterns that hint at its magical properties. Its design includes a dramatic, ornate hilt with pronounced cross-guard elements, enhancing both its aesthetic appeal and combat functionality. The balance of the sword allows for swift, powerful strikes, making it an ideal choice for both melee encounters and display. Crafted with an ancient technique, this weapon not only serves as a formidable tool in battle but also as a symbol of power and mastery. Wielding this blade might invoke fear in enemies and awe among allies."
},
"tech.trait.wallet.nft_token_attributes": {
"attributes": [
{
"name": "Base attack",
"display_type": "number",
"value": 75
},
"tech.trait.wallet.square_icon": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
},
"tech.trait.wallet.nft_token_listing_image": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
},
"tech.trait.wallet.nft_token_cover_image": {
"image_uri": "https://s3.us-east-2.amazonaws.com/"
},
"tech.trait.wallet.nft_token_description": {
"nft_token_description": "A very long sword with strong attack."
},
"tech.trait.wallet.nft_token_attributes": {
"attributes": [
{
"name": "Number attribute",
"display_type": "number",
"value": 123
},
{
"name": "Percentage attribute",
"display_type": "percentage",
"value": -17
},
{
"name": "String attribute",
"display_type": "string",
"value": "Some string"
},
{
"name": "Boolean attribute",
"display_type": "boolean",
"value": true
},
{
"name": "Date attribute 1",
"display_type": "date",
"value": "2018-11-13T20:20:39+00:00"
},
{
"name": "Date attribute 2",
"display_type": "date",
"value": "2018-11-13"
},
{
"name": "Date attribute 3",
"display_type": "date",
"value": "20:20:39+00:00"
},
{
"name": "Duration attribute",
"display_type": "duration",
"value": "P3D"
}
]
{
"name": "Critical damage",
"display_type": "percentage",
"value": 25
}
]
}
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit ee22647

Please sign in to comment.