- This topic has 13 replies, 3 voices, and was last updated 3 years, 7 months ago by
Elvin.
-
AuthorPosts
-
February 15, 2022 at 2:24 am #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
}February 15, 2022 at 2:41 am #2119132Elvin
StaffCustomer SupportHi 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.phpFebruary 15, 2022 at 3:05 am #2119161Jason
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
February 15, 2022 at 3:20 am #2119174Elvin
StaffCustomer SupportAh 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)
February 15, 2022 at 3:54 am #2119223Jason
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.
February 15, 2022 at 4:02 am #2119234Elvin
StaffCustomer SupportBy 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.
February 15, 2022 at 5:03 am #2119304Jason
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
February 15, 2022 at 9:44 am #2119878David
StaffCustomer SupportHi 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
February 15, 2022 at 7:09 pm #2120388Jason
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
February 15, 2022 at 9:12 pm #2120482Elvin
StaffCustomer SupportReactjs 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).
February 15, 2022 at 10:54 pm #2120537Jason
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.
February 15, 2022 at 11:45 pm #2120565Elvin
StaffCustomer SupportI 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.
February 16, 2022 at 1:18 am #2120657Jason
thanks heaps for your help, appreciate it, cheers 🙂
February 16, 2022 at 1:55 am #2120692Elvin
StaffCustomer SupportNo problem. 😀
-
AuthorPosts
- You must be logged in to reply to this topic.