Skip to content
    Back to all Bounties

    Earn 4,500 ($45.00)

    Time Remainingdue 1 year ago
    Canceled

    Create a Solana SPL Token Script

    sdiviney
    sdiviney
    Posted 1 year ago

    Bounty Description

    Description

    I need a script to create a Solana SPL token with the following features:

    1. Parameters:

    • network: Specify the Solana network for connection (e.g., devnet, mainnet)
    • token_name: The name of the token
    • token_symbol: The symbol of the token
    • metadata_uri: The URI for the metadata JSON file
    • num_tokens: The number of tokens to mint

    2. Environment Variables

    The script should retrieve a private key from environment variables to pay for the transaction.

    3. Token Creation

    • The script should create the token on the specified network
    • Set the token's metadata (name, symbol, URI)
    • Mint the specified number of tokens

    4. Mint Authority

    After minting the tokens, the script should revoke the mint authority.

    Additional Considerations:

    • Ensure the script handles errors and edge cases (e.g., invalid network, insufficient funds, etc.).
    • Please comment your code including instructions on how to use the script
    • My preference is that the script is written in JS or Python, but TS or Rust are also acceptable
    • Ensure the script adheres to best practices for security, especially when handling private keys.

    Acceptance Criteria

    A script that runs on Replit and fulfills the above requirements

    Please let me know if you need any additional information or if there are any specific requirements I might have overlooked.