releaseDividends(uint256,address) :
This function releases dividends to the token holders of a particular token. It takes in two parameters, an amount and a dividend token address. It first resolves the dividend token address and then transfers the amount from the sender to the contract address. It then calculates the dividends per token by dividing the amount by the total supply and the decimals of the token. Finally, it adds the released dividends to the dividends per token. (autogenerated documentation)
claimDividends(address,address) :
This function allows an account to claim any dividends that are owed to them from a particular dividend token. It first checks to make sure that the account has dividends owing, and then updates the lastDPT mapping with the current dividendsPerToken value. Finally, it transfers the amount of dividends owing to the account and returns the amount. (autogenerated documentation)
resolveDividendToken(address) :
This function is used to add a dividend token to the list of dividend tokens associated with a particular contract. It takes in an address of a dividend token as an argument and checks if it is already present in the list of dividend tokens. If it is not present, it adds the dividend token to the list and increments the tokenIndex variable. (autogenerated documentation)
dividendsOwing(address,address) :
This function calculates the amount of dividends that are owed to a particular account for a particular dividend token. It does this by first calculating the amount of dividends per token that are owed to the account, which is done by subtracting the last dividend per token (lastDPT) from the total dividends per token (dividendsPerToken). It then multiplies this amount by the balance of the account to get the total amount of dividends owed. (autogenerated documentation)