Skip to content

Commit

Permalink
☢️🤖 -> #15 #16 finished, now move onto adding extra integrations with…
Browse files Browse the repository at this point in the history
… github/signal-k/quartz api
  • Loading branch information
Gizmotronn committed Feb 23, 2022
1 parent 87e6146 commit 957eb80
Show file tree
Hide file tree
Showing 9 changed files with 10,758 additions and 7,167 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ chain = ganache
moralisSubdomain = xxxxxxx.usemoralis.com
abiPath = "F:\ethereum-boilerplate\Truffle\build\contracts\Contract.json"

ALCHEMY: https://eth-rinkeby.alchemyapi.io/v2/gQUHfEyfP_v73J37inUmWzPnYN0nOLr_
PRIVATE: a7a2f59191ce8477761f043f9da63a40ced24f803fd6a423930585e981ef5554
STAGING_ALCHEMY_KEY: https://eth-rinkeby.alchemyapi.io/v2/gQUHfEyfP_v73J37inUmWzPnYN0nOLr_
PRIVATE_KEY: a7a2f59191ce8477761f043f9da63a40ced24f803fd6a423930585e981ef5554
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Mandatory info for starting the app
REACT_APP_MORALIS_APPLICATION_ID =
REACT_APP_MORALIS_SERVER_URL =

# Optional info for connecting your localChain and Moralis Database
moralisApiKey = xxxxx
moralisApiSecret = xxxxxxx
frpcPath = F:\frpc\frpc.exe
chain = ganache
moralisSubdomain = xxxxxxx.usemoralis.com
abiPath = "F:\ethereum-boilerplate\Truffle\build\contracts\Contract.json"

STAGING_ALCHEMY_KEY:
PRIVATE_KEY: **not a string
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ With `hardhat` -> Run commands with `--verbose` at the end
## Minting the NFTs
`npx hardhat run scripts/deploy.js --network rinkeby --verbose`

* Go [here](https://github.com/Signal-K/marketplace/settings/environments/407186579/edit) for the environment variables

## 🚀 Technologies Used

Expand Down
32 changes: 18 additions & 14 deletions contracts/GameContent.sol
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,24 @@ contract GameContent is ERC721 {
);

string memory json = Base64.encode(
abi.encodePacked(
'{"name": "',
charAttributes.name,
" -- NFT #: ",
Strings.toString(_tokenId),
'", "description": "This is an NFT that lets people play in the game Metaverse Slayer!", "image": "',
charAttributes.imageURI,
'", "attributes": [ { "trait_type": "Health Points", "value": ',
strHp,
', "max_value":',
strMaxHp,
'}, { "trait_type": "Attack Damage", "value": ',
strAttackDamage,
"} ]}"
bytes(
string(
abi.encodePacked(
'{"name": "',
charAttributes.name,
" -- NFT #: ",
Strings.toString(_tokenId),
'", "description": "An epic NFT", "image": "ipfs://',
charAttributes.imageURI,
'", "attributes": [ { "trait_type": "Health Points", "value": ',
strHp,
', "max_value":',
strMaxHp,
'}, { "trait_type": "Attack Damage", "value": ',
strAttackDamage,
"} ]}"
)
)
)
);

Expand Down
4 changes: 2 additions & 2 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module.exports = {
solidity: '0.8.1',
networks: {
rinkeby: {
url: "https://eth-rinkeby.alchemyapi.io/v2/gQUHfEyfP_v73J37inUmWzPnYN0nOLr_",
accounts: ["a7a2f59191ce8477761f043f9da63a40ced24f803fd6a423930585e981ef5554"]
url: "process.env.STAGING_ALCHEMY_KEY",
accounts: ["process.env.PRIVATE_KEY"]
/*url: process.env.ALCHEMY, // Alchemy Rinkeby URL
accounts: [process.env.PRIVATE], // This is the private key of the account (rinkeby)*/
},
Expand Down
Loading

0 comments on commit 957eb80

Please sign in to comment.