Contract d176ca783226220cf2ea24dceb4216e36a8f23fd84526b726831d76821e52ed8

← Back to Index 📥 Download WASM

Meta

binver 2.0.0
desc Batch operations for your KALE farmers.
rssdkver 22.0.7#211569aa49c8d896877dfca1f2eb4fe9071121c8
rsver 1.85.0
title KaleFail Tractor

Instances

  • CC3VSSYZCSBSUTLG26GH34PVZFSNGOEN2ZYSDZ2YOANFAFJ3UOJGAHD2

Interface

fn __constructor(env: soroban_sdk::Env, farm: soroban_sdk::Address)

Harvest for multiple farmers with a single pail

Arguments

  • farmers - vector of farmer addresses
  • pail - the single pail index to harvest for all farmers

Panics

  • If the farmers vector is empty
  • If all farmers have 0 rewards
fn harvest(
    env: soroban_sdk::Env,
    farmers: soroban_sdk::Vec,
    pail: u32,
) -> soroban_sdk::Vec

Plant for multiple farmers with a single amount Requires authentication from each farmer

Arguments

  • farmers - vector of farmer addresses
  • amount - the amount to plant for each farmer

Returns

  • Vector of booleans indicating success for each planting operation

Panics

  • If the farmers vector is empty
  • If no planting operations succeed
fn plant(
    env: soroban_sdk::Env,
    farmers: soroban_sdk::Vec,
    amount: i128,
) -> soroban_sdk::Vec

Work for multiple farmers with corresponding hashes and nonces

Arguments

  • farmers - vector of farmer addresses
  • hashes - vector of hashes, one per farmer
  • nonces - vector of nonces, one per farmer

Panics

  • If the farmers vector is empty
  • If vector sizes don't match
  • If no work operations succeed (all result in 0 block indices)
fn work(
    env: soroban_sdk::Env,
    farmers: soroban_sdk::Vec,
    hashes: soroban_sdk::Vec>,
    nonces: soroban_sdk::Vec,
) -> soroban_sdk::Vec

Imports

WebAssembly Text (WAT) ▶