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
Build a
main.gothat constructs realistic deposit scenarios, runs each throughextractRoutingthenFilterDeposit, and prints a formatted summary using structured logging.Contribution Guide
devbranch, notmainCloses #12)Implementation Guidelines
Key files:
examples/go-exchange/contract-deposit-firewall/cmd/main.goRoutingInput, callextractRouting, callFilterDeposit, log the result.log/slogwith JSON handler. Each log entry: scenario name, routing source, warnings, decision.Expectations
What done looks like:
go run ./cmd/main.goprints six structured JSON log lines. All decisions match expectations.Discord for questions: codeze_us