License: MIT
This contract is responsible for securely storing user's funds that are used during the voting. These are either ERC20 tokens or NFTs
The struct holds information about user deposited tokens
Parameters:
Name | Type | Description |
---|---|---|
The struct holds information about user balances
Parameters:
The struct holds information about nft contract
Parameters:
The struct that is used in view functions of contract as a return argument
Parameters:
The struct that is used in view functions of contract as a return argument
Parameters:
The function for depositing tokens
Parameters:
The function for withdrawing tokens
Parameters:
The function for delegating tokens
Parameters:
The function for delegating tokens from Treasury
Parameters:
The function for undelegating tokens
Parameters:
The function for undelegating tokens from Treasury
Parameters:
The function for depositing nfts
Parameters:
The function for withdrawing nfts
Parameters:
The function for delegating nfts
Parameters:
The function for delegating nfts from Treasury
Parameters:
The function for undelegating nfts
Parameters:
The function for undelegating nfts from Treasury
Parameters:
The function for recalculating max token locked amount of a user
Parameters:
The function for locking tokens in a proposal
Parameters:
The function for unlocking tokens in proposal
Parameters:
The function for locking nfts
Parameters:
The function for unlocking nfts
Parameters:
The function for recalculating power of nfts
Parameters:
The function for setting erc20 address
Parameters:
The function for setting erc721 address
Parameters:
The function for getting erc20 address
Return values:
The function for getting erc721 address
Return values:
The function for getting nft info
Return values:
The function for getting max locked amount of a user
Parameters:
Return values:
The function for getting token balance of a user
Parameters:
Return values:
The function for getting nft balance of a user
Parameters:
Return values:
The function for getting nft ids of a user
Parameters:
Return values:
The function for getting total power of nfts by ids
Parameters:
Return values:
The function for getting total voting power of the contract
Return values:
The function to define if voter is able to create a proposal. Includes micropool balance
Parameters:
Return values:
The function for getting voting power of users
Parameters:
Return values:
The function for getting voting power after the formula
Parameters:
Return values:
The function for getting information about user's delegations
Parameters:
Return values:
The function for getting information about funds that can be withdrawn
Parameters:
Return values:
The function for getting the total delegated power by the delegator and the delegatee
Parameters:
Return values:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
tokens
uint256
the amount of deposited tokens
nfts
struct EnumerableSet.UintSet
the array of deposited nfts
balances
mapping(enum IGovPool.VoteType => struct IGovUserKeeper.BalanceInfo)
matching vote types with balance infos
nftsPowers
mapping(enum IGovPool.VoteType => uint256)
matching vote types with cached nfts powers
delegatedBalances
mapping(address => struct IGovUserKeeper.BalanceInfo)
matching delegatees with balances infos
delegatedNftPowers
mapping(address => uint256)
matching delegatees with delegated nft powers
allDelegatedBalance
struct IGovUserKeeper.BalanceInfo
the balance info of all delegated assets
delegatees
struct EnumerableSet.AddressSet
the array of delegatees
maxTokensLocked
uint256
the upper bound of currently locked tokens
lockedInProposals
mapping(uint256 => uint256)
the amount of deposited tokens locked in proposals
nftAddress
address
the address of the nft
isSupportPower
bool
boolean flag, if true then nft contract supports power
individualPower
uint256
the voting power an nft
totalSupply
uint256
the total supply of nfts that are not enumerable
nftMinPower
mapping(uint256 => uint256)
matching nft ids to their minimal powers
power
uint256
the total vote power of a user
rawPower
uint256
the total deposited assets power of a user
nftPower
uint256
the total nft power of a user
rawNftPower
uint256
the total deposited nft power of a user
perNftPower
uint256[]
the power of every nft, bounded by index with nftIds
ownedBalance
uint256
the owned erc20 balance, decimals = 18
ownedLength
uint256
the amount of owned nfts
nftIds
uint256[]
the array of nft ids, bounded by index with perNftPower
delegatee
address
the address of delegatee (person who gets delegation)
delegatedTokens
uint256
the amount of delegated tokens
delegatedNfts
uint256[]
the array of delegated nfts, bounded by index with perNftPower
nftPower
uint256
the total power of delegated nfts
perNftPower
uint256[]
the array of nft power, bounded by index with delegatedNfts
payer
address
the address of depositor
receiver
address
the deposit receiver address
amount
uint256
the erc20 deposit amount
payer
address
the address from whom to withdraw the tokens
receiver
address
the withdrawal receiver address
amount
uint256
the erc20 withdrawal amount
delegator
address
the address of delegator
delegatee
address
the address of delegatee
amount
uint256
the erc20 delegation amount
delegatee
address
the address of delegatee
amount
uint256
the erc20 delegation amount
delegator
address
the address of delegator
delegatee
address
the address of delegatee
amount
uint256
the erc20 undelegation amount
delegatee
address
the address of delegatee
amount
uint256
the erc20 undelegation amount
payer
address
the address of depositor
receiver
address
the deposit receiver address
nftIds
uint256[]
the array of deposited nft ids
payer
address
the address from whom to withdraw the nfts
receiver
address
the withdrawal receiver address
nftIds
uint256[]
the withdrawal nft ids
delegator
address
the address of delegator
delegatee
address
the address of delegatee
nftIds
uint256[]
the array of delegated nft ids
delegatee
address
the address of delegatee
nftIds
uint256[]
the array of delegated nft ids
delegator
address
the address of delegator
delegatee
address
the address of delegatee
nftIds
uint256[]
the array of undelegated nft ids
delegatee
address
the address of delegatee
nftIds
uint256[]
the array of undelegated nft ids
lockedProposals
uint256[]
the array of proposal ids for recalculation
voter
address
the address of voter
proposalId
uint256
the id of proposal
voter
address
the address of voter
amount
uint256
the amount of tokens to lock
proposalId
uint256
the id of proposal
voter
address
the address of voter
voter
address
the address of voter
voteType
enum IGovPool.VoteType
the type of vote
nftIds
uint256[]
the array of nft ids to lock
nftIds
uint256[]
the array of nft ids to unlock
nftIds
uint256[]
the array of nft ids to recalculate the power for
_tokenAddress
address
the erc20 address
_nftAddress
address
the erc721 address
individualPower
uint256
the voting power of an nft
nftsTotalSupply
uint256
the total supply of nft contract
[0]
address
tokenAddress
the erc20 address
[0]
address
nftAddress
the erc721 address
isSupportPower
bool
boolean flag, if true then nft contract supports power
individualPower
uint256
the voting power an nft
totalSupply
uint256
the total supply of nfts that are not enumerable
voter
address
the address of voter
[0]
uint256
max locked amount
voter
address
the address of voter
voteType
enum IGovPool.VoteType
the type of vote
balance
uint256
the total balance with delegations
ownedBalance
uint256
the user balance that is not deposited to the contract
voter
address
the address of voter
voteType
enum IGovPool.VoteType
the type of vote
balance
uint256
the total balance with delegations
ownedBalance
uint256
the number of nfts that are not deposited to the contract
voter
address
the address of voter
voteType
enum IGovPool.VoteType
the type of vote
nfts
uint256[]
the array of owned nft ids
ownedLength
uint256
the number of nfts that are not deposited to the contract
nftIds
uint256[]
the array of nft ids
voteType
enum IGovPool.VoteType
the type of vote
voter
address
the address of user
perNftPowerArray
bool
should the nft raw powers array be returned
nftPower
uint256
the total total power of nfts
perNftPower
uint256[]
the array of nft powers, bounded with nftIds by index
power
uint256
total power
voter
address
the address of voter
voteType
enum IGovPool.VoteType
the type of vote
requiredVotes
uint256
the required voting power
[0]
bool
true
- can participate, false
- can't participate
users
address[]
the array of users addresses
voteTypes
enum IGovPool.VoteType[]
the array of vote types
perNftPowerArray
bool
should the nft powers array be calculated
votingPowers
struct IGovUserKeeper.VotingPowerView[]
the array of VotingPowerView structs
voter
address
the address of the voter
amount
uint256
the amount of tokens
nftIds
uint256[]
the array of nft ids
personalPower
uint256
the personal voting power after the formula
fullPower
uint256
the personal plus delegated voting power after the formula
user
address
the address of user
perNftPowerArray
bool
should the nft powers array be calculated
power
uint256
the total delegated power
delegationsInfo
struct IGovUserKeeper.DelegationInfoView[]
the array of DelegationInfoView structs
voter
address
the address of voter
lockedProposals
uint256[]
the array of ids of locked proposals
unlockedNfts
uint256[]
the array of unlocked nfts
withdrawableTokens
uint256
the tokens that can we withdrawn
withdrawableNfts
uint256[]
the array of nfts that can we withdrawn
delegator
address
the address of the delegator
delegatee
address
the address of the delegatee
delegatedPower
uint256
the total delegated power