Campaign
The Campaign Contract manages campaign information, reward information, and participation history. In addition, participation in the campaign and payment of rewards are also made in the Campaign Contract. Rewards are divided into participation rewards and referral rewards, and VKR is used for referral rewards by default.
To set participation conditions except deposit, you must use qualifier. For the implementation of Qualifier, refer to next document.
When instantiating a Campaign Contract, the CampaignManager's CampaignInstatntiateMsg
is used
CampaignConfigMsg
Key
Type
Description
title
String
Campaign title
description
String
Campaign description
url
String
Campaign site url
parameter_key
String
Query parameter key to contain referral information
participation_reward_denom
Denom
Participation reward denom
participation_reward_amount
Uint128
Participation reward quantity
referral_reward_amount
Vec<Uint128>
Referral reward scheme
ExecuteMsg
UpdateCampaignInfo
Updates the configuration for the Campaign information (title, url, description)
Key
Type
Description
title*
String
Campaign title
description*
String
Campaign description
url*
String
Campaign site url
parameter_key*
String
Query parameter key to contain referral information
deposit_amount*
Uint128
The amount of deposit required to participate in the campaign
deposit_lock_period*
u64
The period from participate in the campaign until withdraw
qualifier*
String
The qualifier contract address used for validation in the campaign
qualification_description
String
Campaign participation conditions text description
executions*
Vec<ExecutionMsg>
Messages to be executed when participating in the campaign
admin*
String
The admin address with the right to edit the settings for the campaign
* = optional
UpdateRewardConfig
One can configure the participation and referral rewards scheme
Key
Type
Description
participation_reward_amount*
Uint128
Participation reward amount
referral_reward_amount*
Vec<Uint128>
Referral reward scheme
* = optional
UpdateActivation
..
Key
Type
Description
active
bool
Campaign activation change
SetNoQulification
Set when there is no Qualification Contract
AddRewardPool
A message to add a reward to the campaign pool. a minimum Referral rewards ratio 20% must be maintained on the contract. **When executing the message, 1% of the total additional rewards (participation reward + shared reward) is used as a commission..**(Approximate value in UST)
CW20 executes AddRewardPool Message after granting permission with Allowance without sending with Send/Transfer.
Key
Type
Description
participation_reward_amount
Uint128
Participation reward amount
referral_reward_amount
Uint128
Referral reward amount
RemoveRewardPool
A message that subtracts the added reward with the AddRewardPool message. A fee of 10% is applied when removing
Key
Type
Description
denom
Denom
The denomination of the token requesting withdrawal
amount*
Uint128
The withdrawal amount (default = [withdrawable_balance])
* = optional
RemoveIrregularRewardPool
Used when withdrawing deposit errors
Key
Type
Description
denom
Denom
Destination address of withdrawing request
ClaimParticipationReward
When Users claim their participation reward
ClaimReferralReward
When Users claim their referral reward
Participate
Participation Message
Key
Type
Description
actor
String
User wallet address
referrer*
Referrer
Referrer's wallet address
* = optional
Deposit
When you deposit and participate in the tokens used to participate in the campaign, you are locked by lock_period.
Withdraw
Withdrawal (only unlocked amount)
Key
Type
Description
amount
Uint128
Withdrawal amount
Receive Hooks
Deposit
Message used to deposit when using CW20 tokens as deposit
QueryMsg
CampaignConfig
Response
Key
Type
Description
governance
String
Contract address of governance
campaign_manager
String
Contract address of campaign-manager
title
String
Campaign title
description
String
Campaign description
url
String
Campaign site url
parameter_key
String
Query parameter key to contain referral information
deposit_denom*
Denom
Deposit required to participate in the campaign denom
deposit_amount
Uint128
The amount of amount required to participate in the campaign
deposit_lock_period
u64
The period from participate in the campaign until withdraw
qualifier
String
The qualifier contract address used for validation in the campaign
qualification_description
String
Campaign participation conditions text description
executions
Vec<ExecutionMsg>
Messages to be executed when participating in the campaign
admin
String
The admin address with the right to edit the settings for the campaign
creator
String
Wallet address where the campaign was created
created_at
Timestamp
Campaign creation time
RewardConfig
Response
Key
Type
Description
participation_reward_denom
Denom
Participation reward denom
participation_reward_amount
Uint128
Participation reward amount
referral_reward_token
String
Referral reward token address
referral_reward_amount
Vec<Uint128>
Referral reward scheme
CampaignState
Response
Key
Type
Description
actor_count
u64
Participant count
participation_count
u64
Participation count
cumulative_participation_reward_amount
Uint128
Cumulative participation reward sum
cumulative_referral_reward_amount
Uint128
Cumulative shared referral sum
locked_balances
Vec<(Denom, Uint128)>
Amount that cannot be withdrawn due to unrecoverable rewards, etc.
balances
Vec<(Denom, Uint128)>
Contract balance deposited with normal addRewardPool message
is_active
bool
Active state
is_pending
bool
Whether on standby
*Standby = never active
ShareUrl
Key
Type
Description
address
String
Wallet address of actor
Response
Key
Type
Description
address
String
Wallet address
compressed
String
Compressed user address
url
Uint128
Share url
GetAddressFromReferrer
QueryMsg to get the original wallet address if not Referrer::Address
Key
Type
Description
referrer
Referrer
Referrer
Response
Key
Type
Description
address
String
Wallet address of User
ReferralRewardLimitAmount
Key
Type
Description
address
String
Wallet address of User
Response
Key
Type
Description
address
String
Wallet address
limit_amount
Uint128
Applied limit
base_limit_amount
Uint128
Minimum limit
actor_limit_amount
Uint128
Original limit
Actor
Key
Type
Description
address
String
Wallet address of actor
Response
Key
Type
Description
address
String
Wallet address of actor
referrer_address*
String
Wallet address of Referrer
participation_reward_amount
Uint128
Amount of recoverable rewards received by participating
referral_reward_amount
Uint128
Amount of recoverable rewards received through referrals
cumulative_participation_reward_amount
Uint128
Cumulative Participation Rewards
cumulative_referral_reward_amount
Uint128
Cumulative Referral Rewards
participation_count
u64
Participation count
referral_count
u64
Number of referrals
last_participated_at
Timestamp
Last participation time
Actors
Key
Type
Description
start_after*
String
Wallet address to start query at
limit*
u32
Maximum number of query entries
order_by*
OrderBy
Order to make query
Response
Key
Type
Description
actors
Vec<ActorResponse>
List of actor
Deposit
Key
Type
Description
address
String
Wallet address of deposit
Response
Key
Type
Description
owner
String
Wallet address of campaign owner
deposit_amount
Uint128
Deposit amount
locked_amounts
Vec<(Uint128, u64)>
Quantity that cannot be withdrawn due to campaign participation
(0: amount, 1: unlock_height)
Last updated