Skip to content

fix(wstaking): reject blocked region withdraw receivers#1087

Open
modelsbridgeaicom-ship-it wants to merge 1 commit into
openmetaearth:mainfrom
modelsbridgeaicom-ship-it:fix/wstaking-blocked-region-withdraw-receiver
Open

fix(wstaking): reject blocked region withdraw receivers#1087
modelsbridgeaicom-ship-it wants to merge 1 commit into
openmetaearth:mainfrom
modelsbridgeaicom-ship-it:fix/wstaking-blocked-region-withdraw-receiver

Conversation

@modelsbridgeaicom-ship-it

Copy link
Copy Markdown
Contributor

Summary

  • reject blocked module account receivers in MsgWithdrawFromRegion before moving region treasury funds
  • cover both GlobalDao and granted region withdrawer calls against the fee collector module account
  • assert the blocked receiver and region treasury balances are unchanged on rejection

Fixes #1081

Validation

  • git diff --check
  • CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC="C:\Users\Administrator\Documents\Codex\2026-06-04\100rmb-30\tools\zig-0.16.0\zig.exe cc -target x86_64-linux-gnu" ..\..\tools\go\bin\go.exe test -c ./x/wstaking/keeper -o ..\..\artifacts\me-hub-wstaking-keeper-linux.test
  • ..\..\tools\go\bin\go.exe test ./x/wstaking/types -run WithdrawFromRegion -count=1

Note: direct Windows execution of go test ./x/wstaking/keeper -run TestKeeperTestSuite/TestWithdrawFromRegionRejectsBlockedModuleReceiver -count=1 still cannot link because wasmvm v1.4.1 does not ship the required Windows wasmvm.dll/libwasmvm.a in this environment. The Linux/CGO keeper test binary compile above passed.

@koelzen koelzen added run-ci Trigger CI run and removed run-ci Trigger CI run labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG BOUNTY] [Medium] [WStaking/WBank] Region treasury withdrawal can fund blocked module accounts

2 participants