From e7a8815660d3e0e5b80ea05d462d887458d58a0f Mon Sep 17 00:00:00 2001 From: ibrizsabin Date: Mon, 23 Sep 2024 08:55:18 +0545 Subject: [PATCH] fix: add query methods --- .../sui/intent_v1/Move.lock:Zone.Identifier | 0 .../sui/intent_v1/Move.toml:Zone.Identifier | 0 .../cluster_connection.move:Zone.Identifier | 0 contracts/sui/intent_v1/sources/main.move | 19 ++++++++++--------- .../sources/main.move:Zone.Identifier | 0 .../order_cancel.move:Zone.Identifier | 0 .../messages/order_fill.move:Zone.Identifier | 0 .../order_message.move:Zone.Identifier | 0 .../types/swap_order.move:Zone.Identifier | 0 .../sources/types/utils.move:Zone.Identifier | 0 .../settlement_tests.move:Zone.Identifier | 0 11 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 contracts/sui/intent_v1/Move.lock:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/Move.toml:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/sources/cluster_connection.move:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/sources/main.move:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/sources/messages/order_cancel.move:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/sources/messages/order_fill.move:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/sources/messages/order_message.move:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/sources/types/swap_order.move:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/sources/types/utils.move:Zone.Identifier delete mode 100644 contracts/sui/intent_v1/tests/settlement_tests.move:Zone.Identifier diff --git a/contracts/sui/intent_v1/Move.lock:Zone.Identifier b/contracts/sui/intent_v1/Move.lock:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/Move.toml:Zone.Identifier b/contracts/sui/intent_v1/Move.toml:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/sources/cluster_connection.move:Zone.Identifier b/contracts/sui/intent_v1/sources/cluster_connection.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/sources/main.move b/contracts/sui/intent_v1/sources/main.move index fa825962..609d5a36 100644 --- a/contracts/sui/intent_v1/sources/main.move +++ b/contracts/sui/intent_v1/sources/main.move @@ -416,18 +416,22 @@ module intents_v1::main { self.connection.get_receipt(nid, conn_sn) } - + entry public fun get_deposit_id(self:&Storage):u128 { + self.deposit_id + } - + entry public fun get_order(self:&Storage,id:u128):SwapOrder{ + *self.orders.borrow(id) + } + + public fun get_version(self:&Storage):u64{ self.version } - public fun get_deposit_id(self:&Storage):u128 { - self.deposit_id - } + public fun get_funds(self:&Storage):&Bag { &self.funds @@ -441,10 +445,7 @@ module intents_v1::main { self.connection.get_relayer() } - public fun get_order(self:&Storage,id:u128):SwapOrder{ - *self.orders.borrow(id) - } - + #[test_only] diff --git a/contracts/sui/intent_v1/sources/main.move:Zone.Identifier b/contracts/sui/intent_v1/sources/main.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/sources/messages/order_cancel.move:Zone.Identifier b/contracts/sui/intent_v1/sources/messages/order_cancel.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/sources/messages/order_fill.move:Zone.Identifier b/contracts/sui/intent_v1/sources/messages/order_fill.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/sources/messages/order_message.move:Zone.Identifier b/contracts/sui/intent_v1/sources/messages/order_message.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/sources/types/swap_order.move:Zone.Identifier b/contracts/sui/intent_v1/sources/types/swap_order.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/sources/types/utils.move:Zone.Identifier b/contracts/sui/intent_v1/sources/types/utils.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000 diff --git a/contracts/sui/intent_v1/tests/settlement_tests.move:Zone.Identifier b/contracts/sui/intent_v1/tests/settlement_tests.move:Zone.Identifier deleted file mode 100644 index e69de29b..00000000