Build An API
We have a public API that you can use, details are in the API Documentation section.
API DocumentationIf you prefer to build your own API instead, you'll need to keep track of data related to the tf.waxdao
contract. We've made that quite simple for you.
If you're using a SHIP reader, you can watch for the following actions.
createfarm
This will notify you of the creation of any new farms so you can add them into a table.
creator
name
The WAX address of the user who created the farm
farm_name
name
The name of the farm they created
staking_token
extended_symbol
The symbol and contract of the token that will be staked in the farm
vesting_time
uint64_t
The amount of seconds that users will need to lock their tokens for if they stake in the farm
original_creator
name
Since our partners act as intermediaries, the partners are the creator
of all their farms. original_creator
allows them to specify the user who actually created the farm, so we can track it off chain and use it for indexing
logclaim
When a user claims rewards, this action will be called so you can track the amounts claimed.
user
name
The wallet address of the user who made the claim
farm_name
name
The name of the farm they claimed from
claimed_rewards
vector<extended_asset>
A list of the token amounts that were claimed. Including the amount, symbol and contract
logrewards
Whenever the state of a reward pool for a farm changes, this action will log a list of all reward pools for that farm, and their current state.
f
farm_struct
A custom struct which has the same structure as the farms table
rs
vector<reward_struct>
A vector of custom structs which match the rows of the rewards table
The struct definitions are outlined below.
logstake
Any time a user stakes new tokens into a farm, this action logs the relevant information.
user
name
The name of the user who staked
farm_name
name
The name of the farm they staked into
amount
extended_asset
The amount that they staked in this transaction
updated_balance
extended_asset
Their current staked balance after adding the new stake to the farm
logunstake
Works the same as the logstake action, except this is for unstaking instead.
user
name
The name of the user who unstaked
farm_name
name
The farm that they unstaked from
amount
extended_asset
The amount that they unstaked
updated_balance
extended_asset
Their current staked balance after unstaking
Last updated