Contract fe1264cdd67ac64cfaa73c4f2cf29eed5f657f43a2c7bcf8228708dfe835c236

← Back to Index 📥 Download WASM

Meta

binver 1.1.0
desc Combine your wonderful produce into a delightful, healthy salad NFT
rssdkver 22.0.7#211569aa49c8d896877dfca1f2eb4fe9071121c8
rsver 1.81.0
title KALE Salad

Interface

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    nft_name: soroban_sdk::String,
    nft_symbol: soroban_sdk::String,
    base_uri: soroban_sdk::String,
    vegetables: soroban_sdk::Vec,
    payment_each_vegetable: i128,
)
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
fn set_price(env: soroban_sdk::Env, payment_each_vegetable: i128)

Mint a KALE Salad NFT to the balance of owner.

Arguments

  • owner - The address which will own the minted NFT(s)
  • payment_each_vegetable - How much of each vegetable (in stroops) the owner is paying in exchange for the NFT.
  • number_of_tokens - The number of NFTs which should be minted to the owner's address.

Panics

  • If the payment amount does not meet the required minimum.
  • If the total maximum number of NFTs has already been minted.
  • If the requested number of NFTs would exceed the total maximum NFTs.
  • If the requested number of NFTs would exceed the maximum NFTs allowed per address.

Events

  • Emits an event with:
  • topics - ["mint", admin: Address, owner: Address]
  • data - token_id: u32
fn mint_salad(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    number_of_tokens: Option,
)
fn set_base_uri(env: soroban_sdk::Env, base_uri: soroban_sdk::String)
fn base_uri(env: soroban_sdk::Env) -> soroban_sdk::String
fn decimals(env: soroban_sdk::Env) -> u32
fn burn(env: soroban_sdk::Env, owner: soroban_sdk::Address, token_id: u32)
fn burn_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    token_id: u32,
)
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> u32
fn owner_of(env: soroban_sdk::Env, token_id: u32) -> soroban_sdk::Address
fn approve(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    token_id: u32,
    expiration_ledger: u32,
)
fn get_approved(env: soroban_sdk::Env, token_id: u32) -> Option
fn approve_all(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    expiration_ledger: u32,
)
fn is_approved_all(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> bool
fn transfer(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    to: soroban_sdk::Address,
    token_id: u32,
)
fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    to: soroban_sdk::Address,
    token_id: u32,
)
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn token_uri(env: soroban_sdk::Env, token_id: u32) -> soroban_sdk::String

Imports

WebAssembly Text (WAT) ▶