Checkpoint module for issuing ether dividends (DividendCheckpoint.sol)
View Source: contracts/modules/Checkpoint/Dividend/DividendCheckpoint.sol
↗ Extends: DividendCheckpointStorage, ICheckpoint, Module ↘ Derived Contracts: ERC20DividendCheckpoint, EtherDividendCheckpoint
DividendCheckpoint
abstract contract
Contract Members
Constants & Variables
uint256 internal constant e18;Events
event SetDefaultExcludedAddresses(address[] _excluded);
event SetWithholding(address[] _investors, uint256[] _withholding);
event SetWithholdingFixed(address[] _investors, uint256 _withholding);
event SetWallet(address indexed _oldWallet, address indexed _newWallet);
event UpdateDividendDates(uint256 indexed _dividendIndex, uint256 _maturity, uint256 _expiry);Functions
_validDividendIndex
Arguments
Name
Type
Description
_dividendIndex
uint256
configure
Function used to intialize the contract variables
Arguments
Name
Type
Description
_wallet
address payable
Ethereum account address to receive reclaimed dividends and tax
getInitFunction
⤾ overrides IModule.getInitFunction
Init function i.e generalise function to maintain the structure of the module contract
Returns
bytes4
Arguments
Name
Type
Description
changeWallet
Function used to change wallet address
Arguments
Name
Type
Description
_wallet
address payable
Ethereum account address to receive reclaimed dividends and tax
_setWallet
Arguments
Name
Type
Description
_wallet
address payable
getDefaultExcluded
Return the default excluded addresses
Returns
List of excluded addresses
Arguments
Name
Type
Description
getTreasuryWallet
Returns the treasury wallet address
Arguments
Name
Type
Description
createCheckpoint
Creates a checkpoint on the security token
Returns
Checkpoint ID
Arguments
Name
Type
Description
setDefaultExcluded
Function to clear and set list of excluded addresses used for future dividends
Arguments
Name
Type
Description
_excluded
address[]
Addresses of investors
setWithholding
Function to set withholding tax rates for investors
Arguments
Name
Type
Description
_investors
address[]
Addresses of investors
_withholding
uint256[]
Withholding tax for individual investors (multiplied by 10**16)
setWithholdingFixed
Function to set withholding tax rates for investors
Arguments
Name
Type
Description
_investors
address[]
Addresses of investor
_withholding
uint256
Withholding tax for all investors (multiplied by 10**16)
pushDividendPaymentToAddresses
Issuer can push dividends to provided addresses
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to push
_payees
address payable[]
Addresses to which to push the dividend
pushDividendPayment
Issuer can push dividends using the investor list from the security token
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to push
_start
uint256
Index in investor list at which to start pushing dividends
_end
uint256
Index in investor list at which to stop pushing dividends
pullDividendPayment
Investors can pull their own dividends
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to pull
_payDividend
⤿ Overridden Implementation(s): ERC20DividendCheckpoint._payDividend,EtherDividendCheckpoint._payDividend
Internal function for paying dividends
Arguments
Name
Type
Description
_payee
address payable
Address of investor
_dividend
struct DividendCheckpointStorage.Dividend
Storage with previously issued dividends
_dividendIndex
uint256
Dividend to pay
reclaimDividend
⤿ Overridden Implementation(s): ERC20DividendCheckpoint.reclaimDividend,EtherDividendCheckpoint.reclaimDividend
Issuer can reclaim remaining unclaimed dividend amounts, for expired dividends
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to reclaim
calculateDividend
Calculate amount of dividends claimable
Returns
claim, withheld amounts
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to calculate
_payee
address
Affected investor address
getDividendIndex
Get the index according to the checkpoint id
Returns
uint256[]
Arguments
Name
Type
Description
_checkpointId
uint256
Checkpoint id to query
withdrawWithholding
⤿ Overridden Implementation(s): ERC20DividendCheckpoint.withdrawWithholding,EtherDividendCheckpoint.withdrawWithholding
Allows issuer to withdraw withheld tax
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to withdraw from
updateDividendDates
Allows issuer to change maturity / expiry dates for dividends
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to withdraw from
_maturity
uint256
updated maturity date
_expiry
uint256
updated expiry date
getDividendsData
Get static dividend data
Returns
uint256[] timestamp of dividends creation
Arguments
Name
Type
Description
getDividendData
Get static dividend data
Returns
uint256 timestamp of dividend creation
Arguments
Name
Type
Description
_dividendIndex
uint256
getDividendProgress
Retrieves list of investors, their claim status and whether they are excluded
Returns
address[] list of investors
Arguments
Name
Type
Description
_dividendIndex
uint256
Dividend to withdraw from
getCheckpointData
Retrieves list of investors, their balances, and their current withholding tax percentage
Returns
address[] list of investors
Arguments
Name
Type
Description
_checkpointId
uint256
Checkpoint Id to query for
isExcluded
Checks whether an address is excluded from claiming a dividend
Returns
bool whether the address is excluded
Arguments
Name
Type
Description
_investor
address
_dividendIndex
uint256
Dividend to withdraw from
isClaimed
Checks whether an address has claimed a dividend
Returns
bool whether the address has claimed
Arguments
Name
Type
Description
_investor
address
_dividendIndex
uint256
Dividend to withdraw from
getPermissions
⤾ overrides IModule.getPermissions
Return the permissions flag that are associated with this module
Returns
bytes32 array
Arguments
Name
Type
Description
Last updated
Was this helpful?