Custom Solana Program

Job ID: 32852960

Budget: $10 – $20 USD

Creation of a “Solana (SOL) NFT Lottery” program that selects minted NFT IDs at random, is able to determine whether or not a single SOL address owns all of the randomly chosen NFT IDs, and then automatically fund that balance from a predefined SOL contract address:

The program should accept the following as input to start the program:

- A SOL address the program will securely control
- An emergency recovery address to send the SOL to (an address controlled by the project)
- DNA or IDs of 10K NFTs from a specified collection of NFTs (possibly the Candy Machine ID?)
- A designated start date for the program to become active (i.e. once all 10K NFTs have been minted)
- A time threshold of 90 days or indefinitely (recurring lotteries); with the ability to manually conclude the lottery.

The program needs to accomplish the following:

- The option to run in 90 day increments or run indefinitely (recurring 90 day intervals)
- It needs to include a manual start / stop override of the 90 days cycles
- This program will control a single SOL address, which should accept periodic deposits without issue
- The ability to recover the SOL held in this contract address, in case of emergency
- This program should randomly select NFT IDs from a specified - fully minted - 10K NFT collection
- The amount of NFT IDs to collect should be set in a config file and should output the results to a text file, or any suitable format for us to be able to retrieve the data
- This program will search the SOL Blockchain once per day and be able to make a determination about whether or not a single address owns a multitude of these randomly selected NFT IDs
- Once a single SOL address (the winner) owns the entire set of randomly chosen NFTs, the program needs to then send the balance from the SOL deposit address to the winner’s address
- The program will function for a single NFT collection per execution, but should be customisable, so that the program can also be used for future NFT collections
- If - after the 90 day cycle - a single SOL address does not own all of the randomly selected NFTs, the program will trigger a new 90 day cycle, select a new set of random NFT IDs, and then reiterate the former steps.

Notes: I don't believe the entire Solana blockchain/every Solana address needs to be searched to identify the address holding the NFT's. There are existing RPC commands to snapshot or check the addresses of collections. this should be able to be accomplished in 1 call per NFT in the random list per day.

Maximum Budget is $1200 no negotiations. Do not bid if this is an issue.
Related categories: Blockchain Rust Solana