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

Conversation

bweick
Copy link
Contributor

@bweick bweick commented Jul 6, 2018

No description provided.


// Check that maker's component tokens in Vault have been incremented correctly
for (uint16 i = 0; i < components.length; i++) {
uint currentBal = IVault(state.vaultAddress).getOwnerBalance(
Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking through the possibilities and vulns here - issue transfers from the user account if the required component amount is not in the vault.

uint[] memory componentUnits = ISetToken(_order.setAddress).getUnits();

// Calculate amount of component tokens required to issue
for (uint16 i = 0; i < components.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is necessary. Issue will fail automatically if the correct component amounts are not either in the vault or the users account

@asoong asoong changed the title Brian/order settlement [WIP] Brian/order settlement Jul 6, 2018
@bweick bweick force-pushed the brian/order_settlement branch 6 times, most recently from cbe4121 to f62688d Compare July 11, 2018 02:42
@bweick bweick changed the title [WIP] Brian/order settlement Brian/order settlement Jul 11, 2018
@coveralls
Copy link

coveralls commented Jul 11, 2018

Pull Request Test Coverage Report for Build 544

  • 25 of 25 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 99.732%

Totals Coverage Status
Change from base Build 523: 0.02%
Covered Lines: 273
Relevant Lines: 273

💛 - Coveralls

@bweick bweick requested a review from a team July 11, 2018 15:44
});

// Verify signature is authentic
//Verify signature is authentic
Copy link
Contributor

Choose a reason for hiding this comment

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

Add that space!

uint[] memory requiredBalances = new uint[](_order.requiredComponents.length);

// Calculate amount of maker token required
// Look into rounding errors
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added to tech debt

_order.makerAddress,
_order.requiredComponents[i]
);
//require(currentBal >= requiredBalances[i]);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is pending taker wallet exchange I assume?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Si

_values[2], // expiration
_values[3], // relayerTokenAmount
_values[4] // salt
_addresses[0], // setAddress
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add descriptions to each of these?

… tooling for signing IssuanceOrders that contain arrays off-chain.
@bweick bweick force-pushed the brian/order_settlement branch from 33327df to ffd823e Compare July 11, 2018 19:02
@bweick bweick merged commit 85e550e into master Jul 11, 2018
@bweick bweick deleted the brian/order_settlement branch July 11, 2018 19:16
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.

3 participants