Skip to content

Build a Main Runner with Scenario Output #222

@codeZe-us

Description

@codeZe-us

Build a main.go that constructs realistic deposit scenarios, runs each through extractRouting then FilterDeposit, and prints a formatted summary using structured logging.

Contribution Guide

  • PRs go to the dev branch, not main
  • Application must explain your specific approach to this task ; generic applications will not be assigned
  • PR description must clearly describe what you built and changed
  • Link your PR to the correct issue number (e.g. Closes #12)

Implementation Guidelines
Key files: examples/go-exchange/contract-deposit-firewall/cmd/main.go

  • At least 6 scenarios: clean muxed, clean memo, contract sender, muxed + memo collision, no routing info, contract sender + ambiguous routing combined.
  • For each: construct RoutingInput, call extractRouting, call FilterDeposit, log the result.
  • Use log/slog with JSON handler. Each log entry: scenario name, routing source, warnings, decision.
  • Exit code 0 if all decisions match inline expectations, exit code 1 on mismatch.

Expectations
What done looks like: go run ./cmd/main.go prints six structured JSON log lines. All decisions match expectations.

Discord for questions: codeze_us

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions