Class TokensImpl

    • Constructor Detail

      • TokensImpl

        public TokensImpl​(AccountsManager accountsManager)
        Constructor
        Parameters:
        accountsManager - the accountsManager
    • Method Detail

      • request

        public org.web3j.protocol.core.methods.response.TransactionReceipt request​(BigInteger amount)
                                                                            throws EthereumException
        Description copied from interface: TokensAPI
        Request a number of Ocean Tokens
        Specified by:
        request in interface TokensAPI
        Parameters:
        amount - Number of tokens requested
        Returns:
        TransactionReceipt tx receipt
        Throws:
        EthereumException - EVM error
      • transfer

        public org.web3j.protocol.core.methods.response.TransactionReceipt transfer​(String receiverAccount,
                                                                                    BigInteger amount)
                                                                             throws EthereumException
        Description copied from interface: TokensAPI
        Transfer tokens from one account to the receiver address
        Specified by:
        transfer in interface TokensAPI
        Parameters:
        receiverAccount - Address of the transfer receiver
        amount - Amount of tokens to transfer
        Returns:
        boolean indicating success/failure of the transfer
        Throws:
        EthereumException - EVM error