Skip to content

Commit

Permalink
Refactor Motoko canister file layout (#49)
Browse files Browse the repository at this point in the history
* Move Motoko library files to 'lib' subdirectory

* Rearrange imports
  • Loading branch information
rvanasa committed Aug 24, 2023
1 parent aa422aa commit e86f754
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
10 changes: 5 additions & 5 deletions canisters/backend/Core.mo
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Types "Types";
import State "State";
import System "System";
import IcEth "canister:ic_eth";
import Principal "mo:base/Principal";
import Nat64 "mo:base/Nat64";
import History "History";
import Snapshot "Snapshot";
import Iter "IterMore";

import Principal "mo:base/Principal";
import Nat64 "mo:base/Nat64";
import System "lib/System";
import Iter "lib/IterMore";
import IcEth "canister:ic_eth";
import Seq "mo:sequence/Sequence";
import Stream "mo:sequence/Stream";

Expand Down
2 changes: 1 addition & 1 deletion canisters/backend/History.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Int "mo:base/Int";
import Iter "mo:base/Iter";
import Seq "mo:sequence/Sequence";
import Stream "mo:sequence/Stream";
import System "lib/System";

import System "System";
import Types "Types";

module {
Expand Down
4 changes: 2 additions & 2 deletions canisters/backend/Main.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import System "lib/System";

import Types "Types";
import Core "Core";
import State "State";

import System "System";
import History "History";
import Snapshot "Snapshot";

Expand Down
2 changes: 1 addition & 1 deletion canisters/backend/Snapshot.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Types "Types";
import State "State";

import Int "mo:base/Int";
import Iter "IterMore";
import Trie "mo:base/Trie";
import Iter "lib/IterMore";

module {
type EthWallet = Types.EthWallet;
Expand Down
5 changes: 2 additions & 3 deletions canisters/backend/State.mo
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Types "Types";
import Relate "Relate";
import System "System";

import Iter "mo:base/Iter";
import Principal "mo:base/Principal";
import Int "mo:base/Int";

import Seq "mo:sequence/Sequence";
import Stream "mo:sequence/Stream";
import Relate "lib/Relate";
import System "lib/System";

module {

Expand Down
2 changes: 1 addition & 1 deletion canisters/backend/Types.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Text "mo:base/Text";
import Nat "mo:base/Nat";
import Hash "mo:base/Hash";
import System "System";
import System "lib/System";

module {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e86f754

Please sign in to comment.