-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
low-priorityNice to have, not urgentNice to have, not urgent
Description
Summary
Implement a Michelson parser/AST in Go to enable rich policy rules for smart contract calls. This would allow Signatory to inspect transaction parameters and enforce granular policies beyond simple operation type filtering.
Use Cases
1. Entrypoint Allowlist
Only allow calls to specific contract entrypoints:
allow:
generic:
- transaction:
entrypoints: [stake, unstake, claim]2. Entrypoint Blocklist
Block dangerous entrypoints while allowing others:
deny:
generic:
- transaction:
entrypoints: [withdraw_all, emergency_exit]3. Parameter Constraints
Limit values in transaction parameters:
allow:
generic:
- transaction:
entrypoint: transfer
constraints:
- path: $.amount
max: 10000000000 # max 10k tez4. Destination + Entrypoint Combinations
allow:
generic:
- transaction:
destination: KT1StakingContract...
entrypoints: [stake, unstake]
- transaction:
destination: KT1GovernanceContract...
entrypoints: [vote, propose]Technical Approach
- Parse Michelson parameters from transaction operations
- Build AST representation of the parameter data
- Implement JSONPath-like query language for policy rules
- Integrate with existing policy engine
Related Issues
- (Rich policy rules) Transfer limits: maximum amount/TX #60 - Transfer limits: maximum amount/TX
- (Rich policy rules) Transfer limits: maximum TX/time period #61 - Transfer limits: maximum TX/time period
- (Rich policy rules) Approved destination list #62 - Approved destination list
- (Rich policy rules) Transfer limits: time of day rules #63 - Transfer limits: time of day rules
- Approval groups: allowing human approval for key operations #64 - Approval groups
Notes
This is a significant undertaking but would enable enterprise-grade policy control for institutional users managing treasury keys, staking operations, or DeFi interactions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
low-priorityNice to have, not urgentNice to have, not urgent
Type
Projects
Status
Planning