From 29e2d87ec3bd75743c3630df9bd458d47cb544af Mon Sep 17 00:00:00 2001 From: Samuel Hawksby-Robinson Date: Tue, 14 May 2024 17:23:28 +0100 Subject: [PATCH] Refactored the analysis dirs --- README.md | 6 +++--- analysis/{wallet_router.md => wallet/Router/README.md} | 4 ++-- .../Router/newSuggestedRoutes.md} | 0 analysis/{wallet_router_usage.md => wallet/Router/usage.md} | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) rename analysis/{wallet_router.md => wallet/Router/README.md} (94%) rename analysis/{wallet_router_newSuggestedRoutes.md => wallet/Router/newSuggestedRoutes.md} (100%) rename analysis/{wallet_router_usage.md => wallet/Router/usage.md} (95%) diff --git a/README.md b/README.md index 7412bfa..c0c2e72 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ - Wallet Router - I've analysed the main components of the wallet router, see here: - - [wallet/Router file analysis](./analysis/wallet_router.md) - - [wallet/Router struct usage](./analysis/wallet_router_usage.md) - - [wallet/Router `newSuggestedRoutes()`](./analysis/wallet_router_newSuggestedRoutes.md) + - [wallet/Router file analysis](./analysis/wallet/Router/overview.md) + - [wallet/Router struct usage](./analysis/wallet/Router/usage.md) + - [wallet/Router `newSuggestedRoutes()`](./analysis/wallet/Router/newSuggestedRoutes.md) ## Schedule - I raised an axe to the crew meetings, swung hard and true. Toppled and prostrate they settled motionless. Tonight we revel in the light of their embers! diff --git a/analysis/wallet_router.md b/analysis/wallet/Router/README.md similarity index 94% rename from analysis/wallet_router.md rename to analysis/wallet/Router/README.md index 574a97d..7e7c19e 100644 --- a/analysis/wallet_router.md +++ b/analysis/wallet/Router/README.md @@ -17,7 +17,7 @@ - Represents a transaction path including details like from/to networks, fees, and estimated costs. - `Router` - Manages routing of transactions using different bridges defined for various transaction types. - - [Usage analysis](./wallet_router_usage.md) + - [Usage analysis](./usage.md) - **Functions:** - `requireApproval()` - Determines if token approval is required before executing a transaction over a bridge. @@ -30,7 +30,7 @@ - Determines if a specified blockchain network's Chain ID is present within a given list of Chain IDs - `newSuggestedRoutes()` - newSuggestedRoutes function is a crucial part of the route selection and optimization process routing transactions across potentially complex network paths. - - [Detailed Analysis of `newSuggestedRoutes()`](./wallet_router_newSuggestedRoutes.md) + - [Detailed Analysis of `newSuggestedRoutes()`](./newSuggestedRoutes.md) # Transaction Handling - The code handles transactions through various bridges which abstract the different transaction types. diff --git a/analysis/wallet_router_newSuggestedRoutes.md b/analysis/wallet/Router/newSuggestedRoutes.md similarity index 100% rename from analysis/wallet_router_newSuggestedRoutes.md rename to analysis/wallet/Router/newSuggestedRoutes.md diff --git a/analysis/wallet_router_usage.md b/analysis/wallet/Router/usage.md similarity index 95% rename from analysis/wallet_router_usage.md rename to analysis/wallet/Router/usage.md index c3a7e71..f707129 100644 --- a/analysis/wallet_router_usage.md +++ b/analysis/wallet/Router/usage.md @@ -1,5 +1,7 @@ # Initialisation -The `Router` struct is only initialised in one place in the application, in `wallet/api.go`: +The `Router` struct is only initialised in one place in the application, in `wallet/api.go`. + +The consumption complexity is very low: ```go func NewAPI(s *Service) *API {