BaseRewardEscrowV2¶
Description¶
Source: contracts/BaseRewardEscrowV2.sol
Variables¶
accountMergingDuration
¶
Type: uint256
accountMergingStartTime
¶
Type: uint256
maxAccountMergingDuration
¶
Type: uint256
max_duration
¶
Type: uint256
nominatedReceiver
¶
Type: mapping(address => address)
permittedEscrowCreators
¶
Type: mapping(address => bool)
Constructor¶
constructor
¶
Details
Signature
constructor(address _owner, address _resolver)
Visibility
public
State Mutability
``
Views¶
accountMergingIsOpen
¶
Details
Signature
accountMergingIsOpen() view returns (bool)
Visibility
public
State Mutability
view
accountVestingEntryIDs
¶
Type: mapping(address => uint256[])
Details
Signature
accountVestingEntryIDs(address account, uint256 index) view returns (uint256)
Visibility
public
State Mutability
view
balanceOf
¶
Details
Signature
balanceOf(address account) view returns (uint256)
Visibility
public
State Mutability
view
getAccountVestingEntryIDs
¶
Details
Signature
getAccountVestingEntryIDs(address account, uint256 index, uint256 pageSize) view returns (uint256[])
Visibility
external
State Mutability
view
getVestingEntry
¶
Details
Signature
getVestingEntry(address account, uint256 entryID) view returns (uint64 endTime, uint256 escrowAmount)
Visibility
external
State Mutability
view
getVestingEntryClaimable
¶
Details
Signature
getVestingEntryClaimable(address account, uint256 entryID) view returns (uint256)
Visibility
external
State Mutability
view
getVestingQuantity
¶
Details
Signature
getVestingQuantity(address account, uint256[] entryIDs) view returns (uint256 total)
Visibility
external
State Mutability
view
getVestingSchedules
¶
Details
Signature
getVestingSchedules(address account, uint256 index, uint256 pageSize) view returns (struct VestingEntries.VestingEntryWithID[])
Visibility
external
State Mutability
view
nextEntryId
¶
Type: uint256
Details
Signature
nextEntryId() view returns (uint256)
Visibility
external
State Mutability
view
numVestingEntries
¶
Details
Signature
numVestingEntries(address account) view returns (uint256)
Visibility
public
State Mutability
view
resolverAddressesRequired
¶
Details
Signature
resolverAddressesRequired() view returns (bytes32[] addresses)
Visibility
public
State Mutability
view
totalEscrowedAccountBalance
¶
Type: mapping(address => uint256)
Details
Signature
totalEscrowedAccountBalance(address account) view returns (uint256)
Visibility
public
State Mutability
view
totalEscrowedBalance
¶
Type: uint256
Details
Signature
totalEscrowedBalance() view returns (uint256)
Visibility
public
State Mutability
view
totalVestedAccountBalance
¶
Type: mapping(address => uint256)
Details
Signature
totalVestedAccountBalance(address account) view returns (uint256)
Visibility
external
State Mutability
view
vestingSchedules
¶
Type: mapping(address => mapping(uint256 => struct VestingEntries.VestingEntry))
Details
Signature
vestingSchedules(address account, uint256 entryId) view returns (struct VestingEntries.VestingEntry)
Visibility
public
State Mutability
view
Restricted Functions¶
appendVestingEntry
¶
Details
Signature
appendVestingEntry(address account, uint256 quantity, uint256 duration)
Visibility
external
State Mutability
``
Modifiers
revokeFrom
¶
Details
Signature
revokeFrom(address account, address recipient, uint256 targetAmount, uint256 startIndex)
Visibility
external
State Mutability
``
Requires
Modifiers
Emits
setAccountMergingDuration
¶
Details
Signature
setAccountMergingDuration(uint256 duration)
Visibility
external
State Mutability
``
Requires
Modifiers
Emits
setMaxAccountMergingWindow
¶
Details
Signature
setMaxAccountMergingWindow(uint256 duration)
Visibility
external
State Mutability
``
Modifiers
Emits
setMaxEscrowDuration
¶
Details
Signature
setMaxEscrowDuration(uint256 duration)
Visibility
external
State Mutability
``
Modifiers
Emits
setPermittedEscrowCreator
¶
Details
Signature
setPermittedEscrowCreator(address creator, bool permitted)
Visibility
external
State Mutability
``
Modifiers
startMergingWindow
¶
Details
Signature
startMergingWindow()
Visibility
external
State Mutability
``
Modifiers
Emits
Internal Functions¶
_appendVestingEntry
¶
Details
Signature
_appendVestingEntry(address account, uint256 quantity, uint256 duration)
Visibility
internal
State Mutability
``
Requires
-
require(..., "Cannot escrow with 0 duration OR above max_duration")
-
require(..., "Must be enough balance in the contract to provide for the vesting entry")
Emits
_claimableAmount
¶
Details
Signature
_claimableAmount(struct VestingEntries.VestingEntry _entry) view returns (uint256)
Visibility
internal
State Mutability
view
_notImplemented
¶
Details
Signature
_notImplemented() pure
Visibility
internal
State Mutability
pure
_subtractAndTransfer
¶
Details
Signature
_subtractAndTransfer(address subtractFrom, address transferTo, uint256 amount)
Visibility
internal
State Mutability
``
feePool
¶
Details
Signature
feePool() view returns (contract IFeePool)
Visibility
internal
State Mutability
view
issuer
¶
Details
Signature
issuer() view returns (contract IIssuer)
Visibility
internal
State Mutability
view
state
¶
Details
Signature
state() view returns (contract IRewardEscrowV2Storage)
Visibility
internal
State Mutability
view
synthetixERC20
¶
Details
Signature
synthetixERC20() view returns (contract IERC20)
Visibility
internal
State Mutability
view
External Functions¶
burnForMigration
¶
Details
Signature
burnForMigration(address, uint256[]) returns (uint256, struct VestingEntries.VestingEntry[])
Visibility
external
State Mutability
``
createEscrowEntry
¶
Details
Signature
createEscrowEntry(address beneficiary, uint256 deposit, uint256 duration)
Visibility
external
State Mutability
``
Requires
importVestingEntries
¶
Details
Signature
importVestingEntries(address, uint256, struct VestingEntries.VestingEntry[])
Visibility
external
State Mutability
``
mergeAccount
¶
Details
Signature
mergeAccount(address from, uint256[] entryIDs)
Visibility
external
State Mutability
``
Requires
Emits
migrateAccountEscrowBalances
¶
Details
Signature
migrateAccountEscrowBalances(address[], uint256[], uint256[])
Visibility
external
State Mutability
``
migrateVestingSchedule
¶
Details
Signature
migrateVestingSchedule(address)
Visibility
external
State Mutability
``
nominateAccountToMerge
¶
Details
Signature
nominateAccountToMerge(address account)
Visibility
external
State Mutability
``
Requires
Emits
vest
¶
Details
Signature
vest(uint256[] entryIDs)
Visibility
external
State Mutability
``
Modifiers¶
onlyFeePool
¶
onlySynthetix
¶
Events¶
AccountMerged
¶
Signature: AccountMerged(address accountToMerge, address destinationAddress, uint256 escrowAmountMerged, uint256[] entryIDs, uint256 time)
AccountMergingDurationUpdated
¶
Signature: AccountMergingDurationUpdated(uint256 newDuration)
AccountMergingStarted
¶
Signature: AccountMergingStarted(uint256 time, uint256 endTime)
MaxAccountMergingDurationUpdated
¶
Signature: MaxAccountMergingDurationUpdated(uint256 newDuration)
MaxEscrowDurationUpdated
¶
Signature: MaxEscrowDurationUpdated(uint256 newDuration)
NominateAccountToMerge
¶
Signature: NominateAccountToMerge(address account, address destination)
Revoked
¶
Signature: Revoked(address account, address recipient, uint256 targetAmount, uint256 startIndex, uint256 endIndex)
Vested
¶
Signature: Vested(address beneficiary, uint256 time, uint256 value)
VestingEntryCreated
¶
Signature: VestingEntryCreated(address beneficiary, uint256 time, uint256 value, uint256 duration, uint256 entryID)