Events
Events are a special recording mechanism used to broadcast specific events or messages during the execution of smart contracts.
Last updated
Events are a special recording mechanism used to broadcast specific events or messages during the execution of smart contracts.
Last updated
In this section, we will introduce all Events related to Dyson Finance, which allows smart contracts to interact with external applications, such as decentralized applications (dApps)
This event will be emitted after the Factory for dual investment and DEX.
token0
address indexed
Sorted tokens index 0*
token1
address indexed
Sorted tokens index 1*
id
uint
The index for Pairs with the same token0-token1 pair
pair
address
The address of created Pair
[token0, token1]*: token0
and token1
are terms used to represent the two tokens in a trading pair. These tokens are sorted according to their addresses to ensure consistency and avoid ambiguity.
The Pair represents a DEX trading pair. This event will be emitted when a user attempts to tokens within the trading pair.
sender
address indexed
msg.sender
who trigger the fuctioin. ex: Router
isSwap0
bool indexed
Indicate the swap input token type. iftoken0
, isSwap0
will be true
amountIn
uint
Swap input amount of input type. Including decimals*
amountOut
uint
The result after the swap is processed. Including decimals*
to
address indexed
The address that receives the swap result
including decimals*: ex: 1000000 amount in USDC represents 1 USDC
user
address indexed
user
who could claim this position
isToken0
bool indexed
Indicate the deposit input token type. iftoken0
, isToken0
will be true
index
uint
amountIn
uint
Deposit input amount of input type. Including decimals*
token0Amt
uint
The potential position ampount in token0 that the user may receive upon expiration. Including decimals*
token1Amt
uint
The potential position amount in token1 that the user may receive upon expiration. Including decimals*
due
uint
The Unix timestamp represents the time when the user can claim the position.
including decimals*: ex: 1000000 amount in USDC represents 1 USDC
user
address indexed
user
who own the claimed position
isToken0
bool indexed
The claimed token type for withdrawal. If the output token is of type token0, then isToken0 will be set to true.
index
uint
amountOut
uint
The position claimed amount. Including decimals*
including decimals*: ex: 1000000 amount in USDC represents 1 USDC
owner
address indexed
Target user address who delegate control of their Note to the operator.
operator
bool indexed
Address that delegates authority to control the owner
's Note.
approved
bool
The permissin is set approved (true
) or not.
When new users want to create a new membership, this event will be emitted.
referrer
uint indexed
Referrer id in map agents
, could use to retrieve referrer's Agent
referee
uint
The new user id in map agents
, could use to retrieve new user's Agent
When an action affects two types of "Points" pools on Farm this event will be emitted.
poolId
address indexed
The Pair Address or Farm Address. Which can be used to retrieve the Pool structure from the pools map. If the address is associated with a Farm, it indicates that the global pool is being updated. If the address is associated with a Pair, it indicates that the local pool is being updated.
rewardRate
uint
Updated RewardRate Decimals: 18
weight
uint
Updated Weight Decimals: 18
user
address indexed
Address which will receive the Points
poolId
address indexed
The dual investment pair address
amountIn
uint
Amount of a internal used parameters "localSP" Decimals: 18
amountOut
uint
Amount of Points with 18 decimals
user
address indexed
The address that spends its own Points to exchange for DYSN.
parent
address indexed
The parent who could get 1/3 Points commission.
amountIn
uint
Spent Points amounts for DYSN Decimals: 18
amountOut
uint
The DYSN amounts user
received
Decimals: 18
vaultOwner
address indexed
The address that received $sDYSN and voting power, and owns the position.
depositor
address indexed
The address which deposit $DYSN (msg.sender)
amount
uint
The amount of $DYSN staked this time. Decimals: 18
sDysonAmount
uint
The amount of $sDYSN minted this time. Which is equal to the additional voting power the vault owner gets. Decimals: 18
time
uint
The lock duration from now for this $DYSN position. unit: secounds
vaultOwner
address indexed
The address that received $sDYSN and voting power, and owns the position.
index
uint
The vaults index to indicate which position was updated
vaults[vaultOwner][indx]
dysonAmountAdded
uint
The amount of $DYSN staked this time. Decimals: 18
sDysonAmountAdded
uint
The amount of $sDYSN minted this time. Which is equal to the additional voting power the vault owner gets. Decimals: 18
time
uint
The lock duration from now for this $DYSN position. unit: secounds
vaultOwner
address indexed
The address that owns the position.
receiver
address indexed
Address that will receive $DYSN
amount
uint
The amount of $DYSN unstaked this time. Decimals: 18
sDysonAmount
uint
The amount of $sDYSN burned this time. Which is equal to the reduction in the voting power of the vault owner. Decimals: 18
This event is emitted when a new Gauge is created, indicating the link from the new Gauge to the existing Pair.
poolId
address indexed
Pair contract address link to new deployed Gauge contract.
gauge
address
New deployed Gauge contract address
user
address indexed
Owner of this deposit position
depositor
address
Address that deposit $sDYSN (msg.sender)
week
uint indexed
The week* in which this deposit position was added
amount
uint
Added $sDYSN Amount Decimals: 18
week*: It's the i-th week since 1970/01/01
user
address indexed
Owner of this deposit position (msg.sender)
week
uint indexed
The week* in which this position amount was removed
amount
uint
This applies to withdrawing the $sDYSN amount Decimals: 18
week*: It's the i-th week since 1970/01/01
user
address indexed
Owner of this pending withdrawal position (msg.sender)
amount
uint
The amount of $sDYSN received by the user
Decimals: 18
This event is emitted when a new Bribe is created and indicates the link to the gauge.
gauge
address indexed
Gauge contract address link to new deployed Bribe contract.
bribe
address
New deployed Bribe contract address
from
address indexed
The address that deposit token rewards (msg.sender)
token
address indexed
The added reward token address
week
uint indexed
The week* to add the reward to.
amount
uint
The amount of added reward tokens. Decimals: by token
week*: It's the i-th week since 1970/01/01
user
address indexed
The address that claimed and received the token rewards (msg.sender).
token
address indexed
The claimed reward token address
week
uint indexed
The week* to claim the reward from.
amount
uint
The amount of claimed reward tokens. Decimals: by token
week*: It's the i-th week since 1970/01/01
The Pair represents a Dual Investment pair. This event will be emitted when a user attempts to tokens to the pair.
The index of this deposit action.
This event will be emitted when a user attempts to a note of a pair.
The index of this withdraw action.
This event will be emitted after a user permission.
Membership(AgentNFT) is transferable through Agency or AgenctNFT . Do not rely solely on Register events to construct the membership tree.
There are two types of pools to help Farm generate Points for users, please review our t to understand how to grant Points.
When the user on Dual Investment Pair and triggers Farm to this event will be emitted.
When the user anyone's Points to DYSN this event will be emitted.
When the user $DYSN to get $sDYSN this event will be emitted.
When the user $DYSN to get $sDYSN this event will be emitted.
When the user $DYSN from staking vaults this event will be emitted.
This event is emitted when an address $sDYSN to a Gauge
This event is emitted when an address$sDYSN from a Gauge.
This event is emitted when an address its pending $sDYSN from a Gauge.
When someone to Bribe for users who deposit in Gauge this event will be emitted.
When users rewards from Bribe this event will be emitted.