Site logo

[Resolved] Quick question about best place to put this config.json code?

Home Forums Support [Resolved] Quick question about best place to put this config.json code?

Home Forums Support Quick question about best place to put this config.json code?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2119113
    Jason

    Hi there,

    I was wondering if you could guide me in the best place to attach these codes for my website? I was thinking it could go in the Theme editor in one of the .PHP files? or do I have to add them via CMD? the main code is below, also I got it from this website. As I am wanting people to be able to mint our NFTs from our website, it does seem pretty straight forward, only thing is I’ve never done it before, so was after some guidance on best place to add the codes? thank you

    https://hackmd.io/@MarkSackerberg/candyV2

    {
    “price”: 0.01,
    “number”: 6,
    “gatekeeper”: null,
    “solTreasuryAccount”: “G2j7mmWuA9AH7u8Ykxm1hSuizxJk8u8YYBUZkuMvmytM”,
    “splTokenAccount”: null,
    “splToken”: null,
    “goLiveDate”: “11 Dec 2021 13:00:00 GMT”,
    “endSettings”: {
    “endSettingType”: { “amount”: true },
    “value”: 5
    },
    “whitelistMintSettings”: {
    “mode”: { “burnEveryTime”: true },
    “mint”: “7nE1GmnMmDKiycFkpHF7mKtxt356FQzVonZqBWsTWZNf”,
    “presale”: true,
    “discountPrice”: 0.5
    },
    “hiddenSettings”: null,
    “storage”: “arweave”,
    “ipfsInfuraProjectId”: null,
    “ipfsInfuraSecret”: null,
    “awsS3Bucket”: null,
    “noRetainAuthority”: false,
    “noMutable”: false
    }

    #2119132
    Elvin
    Staff
    Customer Support

    Hi Jason,

    If it’s about saving the .json file to the site:

    Ideally, you should place this on a .json file on a child theme. (Can be done through FTP)

    You then reference the directory where it’s placed using PHP.

    I’m not sure what this is for exactly so I’m not sure if json_decode() is appropriate for this.

    Perhaps you only need file_get_contents(). https://www.php.net/manual/en/function.file-get-contents.php

    #2119161
    Jason

    Hi there, yes I was thinking to use FTP for the files (which are all PNGs) to upload.

    I basically want to do exactly what these guys are doing on their website here: https://www.boredapezombieclub.com/

    They have a “connect wallet” button, when pressed asks to connect a Phantom wallet or others.

    So, I can still enter the coding in the .PHP ? or do you recommend I use CMD? (I am not that comfortable with CMD, but will use it if I have to ) thanks heaps

    #2119174
    Elvin
    Staff
    Customer Support

    Ah I see. This isn’t just a simple JSON enqueuing.

    The site you’ll be making will actually need the script that generates the JSON for the variation of the NFT and the necessary API to let the site access wallets you’ll be supporting.

    This is quite advanced and is beyond the theme to be honest.

    But to help you out, you can start w/ the wallet integration first. Wallet services usually provide the developer handbook for this. (say for example, you want your site to connect to roninchain wallets. Ronin should have a dev guide for it)

    #2119223
    Jason

    I’ve seen most of the guys do all this using only CMD, on a couple of YouTube videos.

    I was just wondering if there was another way, besides doing the CMD way.

    #2119234
    Elvin
    Staff
    Customer Support

    By CMD, you likely meant CLI(command line interface) then what you’ve probably seen is the act of installing the things I’ve mentioned.

    Perhaps you’ve seen some terms like npm install ... or something equivalent to it.

    This is basically an act of installing a module to the site for the sake of having the necessary scripts for the integration.

    #2119304
    Jason

    Command prompt, or whatever it’s called. I am more familiar with javascript/css, through .PHP editor.

    Which method do you recommend for me? As I am bit stumped. If I have to learn the command prompt entries in order for it to work, then I will do it, thank you

    #2119878
    David
    Staff
    Customer Support

    Hi there,

    I had a quick nose at the documentation and its going to require building your own HTML content and React App.

    Theres quite a few tuts on YouTube about building it, i would suggest starting there and then look at how to serve ‘your app’ from your WP website. Buts it not something you can build directly in WP

    #2120388
    Jason

    Hi David,

    thanks for your response. Did you mean, React as in https://reactjs.org ?

    If so, do you think this would be the less pain staking way to do it? thank you

    Kind regards

    Jason

    #2120482
    Elvin
    Staff
    Customer Support

    Reactjs is a tool.

    It’s going to be a pain if you’re not familiar w/ react’s development environment. You’re going to have to code a bit.

    If so, do you think this would be the less pain staking way to do it? thank you

    Consider checking if the blockchain you’ll be minting NFT on already has a plugin for the most used wallets on WordPress.

    If it’s on the biggest blockchain like Ethereum, there may already be plugins for wallets like Metamask.
    Example – https://metapress.ca/

    But this is just having wallet integration, actual minting of NFT will require another script.

    The other script is basically for tying the actual content into an ERC-20 token(if Ethereum).

    #2120537
    Jason

    I never used Reactjs before.

    So I take it, it would be better to use Command Prompt then? it is on Solana Blockchain, they use Phantom wallet as the main wallet.

    #2120565
    Elvin
    Staff
    Customer Support

    I never used Reactjs before.

    You may have to hire a developer as this is really advanced stuff beyond just the theme or even WordPress. 🙂

    So I take it, it would be better to use Command Prompt then? it is on Solana Blockchain, they use Phantom wallet as the main wallet.

    “Command prompt” is just a tool to install or get another tool. 🙂

    Things you see in YouTube about seeing guys typing things in a CLI is usually oversimplification.

    All the things you actually need are usually edited out from the video because:
    – these extra steps/details are usually uninteresting. (example: setting up a development environment)
    – the channel assumes you already know about NPM (Node package manager)
    – the channel has separate video about it. (divided into parts)

    You’ll still need the technical know-how or at least get someone who does. 😀

    For FTM, I’m not sure if their development handbook is out for public. Solana is pretty centralized for a blockchain so I’m unsure if all the tools you’ll need is open-sourced.

    Reminder: This is really outside of the scope of support. It’s more appropriate to seek help w/ blockchain app developers.

    #2120657
    Jason

    thanks heaps for your help, appreciate it, cheers 🙂

    #2120692
    Elvin
    Staff
    Customer Support

    No problem. 😀

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.