We wont be doing that in this tutorial. Be sure to pass the program ID obtained from the previous steps by using the program flag linking to the json file containing the account that owns the program. In case you slept through all of 2021, NFTs (non-fungible tokens) are hot. To do this, you need to get the keypair from the ./target/deploy/chainlink_solana_demo-keypair.json file that Anchor generated using the following command: The next step is to edit the lib.rs file and replace the keypair in the declare_id! Head of Product at Pinata. This command requests SOL tokens into your newly generated account: The end result is that you have successfully deployed the hello world program to devnet with an assigned program Id. To do so, just click the Mint button: Youll need to confirm the transaction. This is a static value that doesnt need to be modified, account address. This is the effect that having a verifiable sequence of events over time has on the consensus mechanism; it allows the processing to be broken up into multiple parallel processes. We know those images need to be named in a specific way. Solana is a high-performance blockchain capable of thousands of transactions per second and sub-second block times. This displays information about the transaction, including the printed output from the on-chain program. This client is written in Typescript using the, file, which performs a number of tasks in a specific order, most of which are contained within the, The client then calls the checkProgram function, which loads the keypair of the deployed program from. We will need to call this twice, because the Devnet faucet is limited to 2 SOL, and we need approximately 4 SOL.. Builder. The way this demo works is an off-chain client passes in an account to the on-chain program, the on-chain program then obtains the latest price for the specified price feed, and stores the value in the passed in account. The end result is that you have successfully deployed the hello world program to devnet with an assigned program Id. https://github.com/smartcontractkit/solana-starter-kit. Essentially this means PoH is like a cryptographic clock that helps the network agree on time and ordering of events without having to wait to hear from other nodes. Your NFT drop is ready for minting! Note: If you provided a Dedicated Gateway URL in the config, your NFT asset will not only load quicker but will be cached so that all subsequent loads are instant. So, assuming you have the art created, well walk through how to prep this for upload to IPFS through Metaplex. If you want to confirm things, you can find the .cache folder in your nft-project directory. The cloud wasnt built for this. Finally, the program reads the price data from the priceFeed account that was passed into the program, and then outputs the value to the console. And we know that we need JSON metadata files. They can also use one of the existing SDKs, which allow clients to talk to the blockchain and Solana programs. The client then calls the checkProgram function, which loads the keypair of the deployed program from ./dist/program/helloworld-keypair.json and uses the public key for the keypair to fetch the program account. In addition to this, it uses borsh for serializing and deserializing parameters being passed to and from the deployed program. Once the on-chain program execution has completed, it simply reads the price data from the account that was passed into the program.. This can be taken from the Chainlink Solana Feeds page, and the value will be defaulted to the devnet SOL/USD feed address if you dont specify a value. So, from your command line, lets change to our home directory and into the metaplex project, directly into the sample React app: Youll need to install the dependencies like this: Then, open the project in your code editor. Finally, the client queries the accounts data to retrieve the current number of times the account has had the sayHello transaction called, by calling reportGreetings. You should see output showing your program successfully being executed, and it should display the number of times the account has been greeted. ").json}`, JSON.stringify(metadata)), ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts --version, solana-keygen new --outfile ~/.config/solana/devnet.json, solana config set --keypair ~/.config/solana/devnet.json, solana config set --url https://api.devnet.solana.com. Next, the program declares a `chainlink_solana_demo`. Metaplex is a tool that makes launching an NFT project on Solana much easier. for your account. This is the test network for Solana developers writing and testing smart contracts. to be used for obtaining price data, which contains the `execute` function. How are we now going to get those JSON files created and added to the assets folder. When the process is done, youll need to do one more thing. Again. Hopefully, it can lead to more creative projects. Ok, so we know we have images in the folder. In this case, it simply prints a message, then selects the accounts by looping through accounts. This is required to interact with deployed programs (smart contracts) on the Solana devnet cluster. Then, enter a configuration like this: This may feel like a lot, but this is actually just the minimum configuration required. This is required and it allows you to include an array of files for your NFTs. The client then builds up and sends a hello transaction to the program by calling the sayHello function. The `execute` function is the part of the program that contains the main logic for the smart contract. In addition to this, it uses. Now, we need to make sure the Solana CLI is working. Next, the program checks to see if the account has permission to modify the data for the specified account. for storing keys, and should only be used for demo purposes.
is growing at an accelerating rate. The first change is to set the storage property to point to pinata. This is required to interact with deployed programs (smart contracts) on the Solana devnet. We only need the JWT, so copy that and paste it into the pinataJwt configuration file propertys value. Metaplex, a project built to make creating NFT projects on Solana easier is has IPFS support baked in, and this includes the ability to use Pinata to store content and serve that content through a dedicated IPFS gateway. First, the client establishes a connection with the cluster using Anchor and sets up some required parameters, such as pulling in command line arguments and setting of default values: After this, the main function of the client is defined. You will need some lamports (fractions of SOL tokens) to deploy your smart contract. This client is written in Typescript using the Solana web3.js SDK and the Solana RPC API. Depending on how many files you are uploading this process could take a long time. Once youve signed up for an account, you really just need to make sure you have the following installed (each is linked to the installed instructions of you need to install them): For what its worth, we will be following much of the instructions on Metaplexs website with some modifications that allow us to upload content to IPFS through Pinata. This is the test network for Solana developers writing and testing smart contracts.
If not, double check that you have installed the Solana CLI Toolkit. to obtain some SOL tokens. Solana offers a different smart contract model to traditional EVM-based blockchains. You will need some lamports (fractions of SOL tokens) to deploy your smart contract. This helps you know if everything is ready to go and if your NFTs can be minted. To interact with the deployed program, the hello-world repository contains a simple client.