Create an action for add account. This action will add a new account to the graph. It will look similar to the propose action with dao.hypha.
ACTION create(const name &creator, ContentGroups &content_groups);
The inputs for creating an account are:
uint acctID
uint acctTypeID (asset, liability, equity, revenue, expense, gain, loss)
uint acctCode
string AcctName
set of transactions (timestamp, activity, memo)
Thus, the current balance for an Account (snapshot) is an array indexed by currencyID of the current subtotal (signed amounts per currency).
We likely need to experiment with how opening balances are passed in. It might make sense to use multiple actions rather than trying to bundle it into the account's setup ContentGroups.
In this case, the blockchain transaction to create the account would have one action to create and then multiple actions for addopenbal, one for each currency. NOTE: all actions within a transaction either pass or fail together, so it's safe.
Create an action for add account. This action will add a new account to the graph. It will look similar to the
propose
action with dao.hypha.The inputs for creating an account are:
Thus, the current balance for an Account (snapshot) is an array indexed by currencyID of the current subtotal (signed amounts per currency).
We likely need to experiment with how opening balances are passed in. It might make sense to use multiple actions rather than trying to bundle it into the account's setup ContentGroups.
The ContentGroups would look something like this:
The alternative to including the opening balances in the create action would be to add an action such as:
In this case, the blockchain transaction to create the account would have one action to
create
and then multiple actions foraddopenbal
, one for each currency. NOTE: all actions within a transaction either pass or fail together, so it's safe.