diff --git a/dfx.json b/dfx.json index 1f92099..e3ccab7 100644 --- a/dfx.json +++ b/dfx.json @@ -27,6 +27,6 @@ "subnet_type": "application" } }, - "dfx": "0.18.0", + "dfx": "0.19.0", "version": 1 } diff --git a/mops.toml b/mops.toml index b202c6a..bf29dfb 100644 --- a/mops.toml +++ b/mops.toml @@ -1,6 +1,6 @@ [package] name = "icrc3-mo" -version = "0.2.4" +version = "0.2.5" description = "icrc3 for motoko" repository = "https://github.com/PanIndustrial-Org/icrc3.mo" keywords = [ "ledger", "transactions", "log" ] diff --git a/src/lib.mo b/src/lib.mo index f6411f7..cec0577 100644 --- a/src/lib.mo +++ b/src/lib.mo @@ -117,6 +117,8 @@ module { }; }; + + /// The migrate function public let migrate = Migration.migrate; @@ -640,7 +642,7 @@ module { lastIndex = state.lastIndex; firstIndex = state.firstIndex; archives = Iter.toArray(Map.entries(state.archives)); - ledgerCanister = state.ledgerCanister; + ledgerCanister = canister; supportedBlocks = Iter.toArray(Vec.vals(state.supportedBlocks)); bCleaning = state.bCleaning; constants = { @@ -656,6 +658,16 @@ module { }; }; + /// Returns the statistics of the migration + /// + /// This function returns the statistics of the migration. + /// + /// Returns: + /// - The migration statistics + public func get_state() : CurrentState { + return state; + }; + ///Returns an array of supported block types. /// /// @returns {Array} The array of supported block types.