-
Notifications
You must be signed in to change notification settings - Fork 59
Brian/order settlement #93
Conversation
|
||
// 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( |
There was a problem hiding this comment.
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++) { |
There was a problem hiding this comment.
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
cbe4121
to
f62688d
Compare
Pull Request Test Coverage Report for Build 544
💛 - Coveralls |
}); | ||
|
||
// Verify signature is authentic | ||
//Verify signature is authentic |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
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]); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
33327df
to
ffd823e
Compare
No description provided.