Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Conversation

felix2feng
Copy link
Contributor

  • Make usage of batch functions
  • Moved deposit, increment, decrement and withdraw quantity calculations into separate functions
  • Remove IssuanceComponentDeposited log

@felix2feng felix2feng requested review from asoong and bweick November 21, 2018 04:09
@coveralls
Copy link

coveralls commented Nov 21, 2018

Pull Request Test Coverage Report for Build 2968

  • 41 of 41 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 2966: 0.0%
Covered Lines: 670
Relevant Lines: 670

💛 - Coveralls

_quantities[i]
);
}
ITransferProxy(state.transferProxy).batchTransfer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to add some comments here

state.vault
);

IVault(state.vault).batchIncrementTokenOwner(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment

@@ -137,43 +129,37 @@ contract CoreIssuance is
uint256 naturalUnit = setToken.naturalUnit();
address[] memory components = setToken.getComponents();
uint256[] memory units = setToken.getUnits();
uint256[] memory componentQuantities = calculateTransferValues(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments needed in this function

@@ -240,65 +226,40 @@ contract CoreIssuance is
uint256 naturalUnit = setToken.naturalUnit();
address[] memory components = setToken.getComponents();
uint256[] memory units = setToken.getUnits();
uint256[] memory requiredComponentQuantities = calculateTransferValues(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

(
uint256[] memory decrementTokenOwnerValues,
uint256[] memory depositValues
) = calculateDepositAndDecrementQuantities(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

vaultBalance
);
}
vault.batchDecrementTokenOwner(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

amountToDeposit
);
}
ITransferProxy(state.transferProxy).batchTransfer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

Copy link
Contributor

@asoong asoong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felix2feng felix2feng force-pushed the felix/accounting-issuance-opt branch from 52d14d7 to b4022c3 Compare November 21, 2018 23:40
@felix2feng felix2feng merged commit fcd7586 into master Nov 22, 2018
@felix2feng felix2feng deleted the felix/accounting-issuance-opt branch November 22, 2018 00:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants