order cancels

This commit is contained in:
Tim Olson
2023-11-10 16:42:44 -04:00
parent 084c018285
commit 331b9df337
2 changed files with 12 additions and 7 deletions

View File

@@ -59,6 +59,7 @@ contract Vault {
return uint64(ordersInfo.orders.length);
}
// todo rename using dexorder and inform the method hash registries
function placeOrder(OrderLib.SwapOrder memory order) external onlyOwner {
console2.log('Vault.placeOrder()');
ordersInfo._placeOrder(order);
@@ -77,6 +78,12 @@ contract Vault {
ordersInfo.execute(owner, orderIndex, tranche_index, proof);
}
function cancelOrder(uint64 orderIndex) external onlyOwner {
console2.log('cancelOrder');
console2.log(orderIndex);
ordersInfo._cancelOrder(orderIndex);
}
modifier onlyOwner() {
require(msg.sender == owner);
_;