Skip to content

AppCoinsCreditsBalance contract

Gustavo Rios de Sousa e Silva edited this page Jan 29, 2019 · 8 revisions

Features

APPC holder contract
Contract that holds and verfies that the amount of APPC credits correlates to an amount of APPC

How to test

How to deposit funds

Call the method depositFunds. You need Gas to run this command.

This method is usually called by the store. It allocates AppCoins funds that correspond to the proof of balance.This will dispatch the event Deposit.

Name Description
amount Amount of APPC to be deposited in the contract
merkleTreeHash Hash to verify the balance

Events dispacthed:

  • Deposit
  • BalanceProof

Withdraw funds

Call the method withdrawFunds. Only the owner of the contract can call this method.

This method is going to send funds back to the Owner of the contract. This will dispatch the event Deposit Withdraw.

Name Description
amount Amount of APPC to be withdraw
merkleTreeHash Hash to verify the balance

Events dispacthed:

  • Withdraw
  • BalanceProof