Extends the time-to-live (TTL) of the contract instance and its data
fn extend_ttl(env: soroban_sdk::Env)
Initializes a new campaign with the provided data
e - The environmentsender - The address of the sender who must be authorizedcampaign_data - The campaign configuration datafn init(
env: soroban_sdk::Env,
sender: soroban_sdk::Address,
campaign_data: CampaignData,
)
Claims a reward for completing a task
e - The environmentinfluencer - The address of the influencer claiming the rewardtask_id - The ID of the completed taskreward - The amount of reward to claimfn claim_reward(
env: soroban_sdk::Env,
influencer: soroban_sdk::Address,
task_id: u32,
reward: i128,
)
Gets the reward claimed for a specific task
fn get_task_reward(env: soroban_sdk::Env, task_id: u32) -> i128
Gets the remaining reward that can still be claimed
fn get_remaining_reward(env: soroban_sdk::Env) -> i128
Gets the campaign data
fn campaign_data(env: soroban_sdk::Env) -> CampaignData