Skip to content

Foundation

asandanov edited this page Jan 9, 2019 · 5 revisions

Foundation global variables

struct _Token {
    address token;    // App Token address
    uint decimals;    // App Token decimals
    uint total;       // Total number of tokens transferred to PMFund
}

_Token[] public Tokens;   // contains only new Tokens!

Foundation methods

getTokens

accrual tokens on msg.sender address is proportional to the balance of PMT tokens in the repository.

getTokens(
    uint offset,            // offset in Tokens array
    uint limit)             // limit for iteration in Tokens array

withdraw

withdraw tokens from contract to msg.sender address

withdraw(
    address token,          // token address
    uint value)             // numbers of tokens

getFund

balance of tokens on the contract.

getFund(
    address token,          // token address
    address owner           // owner address
) returns (
    uint balance)           // balance of tokens on the contract

getWithdrawn

balance of tokens already withdrawn from this contract.

getWithdrawn(
    address token,          // token address
    address owner           // owner address
) returns (
    uint balance)           // balance of tokens already withdrawn from this contract
Clone this wiki locally