Skip to content

feat(precompiles): implement UCDAO precompile#409

Closed
n1n3b1t wants to merge 16 commits intohaqq-network:pre/v1.9.xfrom
n1n3b1t:feature/ucdao-precompile
Closed

feat(precompiles): implement UCDAO precompile#409
n1n3b1t wants to merge 16 commits intohaqq-network:pre/v1.9.xfrom
n1n3b1t:feature/ucdao-precompile

Conversation

@n1n3b1t
Copy link
Copy Markdown

@n1n3b1t n1n3b1t commented Jan 27, 2026

Summary

  • Add UCDAO precompile at address 0x0000000000000000000000000000000000000805
  • Implement 13 methods: authorization (approve, revoke, increaseAllowance, decreaseAllowance, allowance), transactions (fund, transferOwnership, transferOwnershipWithRatio, transferOwnershipWithAmount), queries (balance, allBalances, totalBalance, enabled)
  • Full authorization support using Cosmos SDK authz with SendAuthorization
  • Emit events for Approval, Revocation, Fund, and TransferOwnership

Changes

  • x/evm/types/precompiles.go - Added UcdaoPrecompileAddress constant
  • x/evm/types/params.go - Added to DefaultStaticPrecompiles
  • x/evm/keeper/static_precompiles.go - Registered precompile
  • x/ucdao/keeper/keeper.go - Added IsModuleEnabled to Keeper interface
  • app/app.go - Added keeper parameter to precompile init
  • precompiles/ucdao/* - Full precompile implementation (9 files)

Test Plan

  • Unit tests for all argument parsers (10 test functions)
  • Unit tests for precompile (LoadABI, IsTransaction, RequiredGas, Address)
  • Build passes
  • All tests pass (go test ./precompiles/ucdao/...)

- Extract asSendAuthorization helper for type assertion pattern
- Add helper functions for event emission with two addresses
- Refactor executeTransfer with checkAndUpdateAuthorization and validateSpendLimit helpers
- Simplify ParseFundArgs by removing intermediate variable
- Remove unused ErrDifferentOriginFromOwner error constant

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Yurist-85 Yurist-85 changed the base branch from master to pre/v1.9.x March 2, 2026 18:00
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant