Treasury
Protocol fee treasury
Last updated
Protocol fee treasury
Last updated
This Solidity smart contract is a standard Membership Treasury contract that allows the exchange of membership points with rewards. Let's break down the variables, events, functions, and internal functions present in this contract:
Name | Type | Visibility |
---|---|---|
onlyRole
Restricts the execution of a function to only accounts that have a specific role assigned.
constructor
Initializes the Treasury contract with the provided parameters.
Parameters
Parameter | Type | Description |
---|---|---|
exchange
Allows subscribers to exchange membership points for rewards.
Parameters
claim
Allows investors to claim rewards with the allocated revenue percentage.
Parameters
settle
Allows developers to settle the revenue with the allocated revenue percentage.
Parameters
setClaim
Sets the number of claims available for a specific member.
Parameters
setSettlement
Sets the settlement for a specific member.
Parameters
refundFee
Refunds the fee to a specific address.
Parameters
getReward
Returns the reward amount for a given token, era, and membership points.
Parameters
getClaim
Returns the claim amount for a given token, member UID, and era.
Parameters
getSettlement
Returns the settlement amount for a given token and era.
Parameters
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
REPORTER_ROLE
bytes32
Public
_treasury
TreasuryLib.Storage
Private
accountant_
address
The address of the BlockAccountant contract.
sabt_
address
The address of the SABT contract.
token
address
The token address.
nthEra
uint32
The era of membership points.
uid
uint32
The UID of the member.
point
uint64
The number of membership points to exchange.
token
address
The token address.
nthEra
uint32
The era of rewards.
uid
uint32
The UID of the member.
token
address
The token address.
nthEra
uint32
The era of revenue settlement.
uid
uint32
The UID of the member.
uid
uint32
The UID of the member.
num
uint32
The number of claims available.
uid
uint32
The UID of the member.
to
address
The address to receive the fee refund.
token
address
The token address.
amount
uint256
The amount of the fee to refund.
token
address
The token address.
nthEra
uint32
The era of rewards.
point
uint256
The number of membership points.
token
address
The token address.
uid
uint32
The UID of the member.
nthEra
uint32
The era of claims.
token
address
The token address.
nthEra
uint32
The era of settlement.