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 95% 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 {