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 tez
4. 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
Notes
This is a significant undertaking but would enable enterprise-grade policy control for institutional users managing treasury keys, staking operations, or DeFi interactions.
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:
2. Entrypoint Blocklist
Block dangerous entrypoints while allowing others:
3. Parameter Constraints
Limit values in transaction parameters:
4. Destination + Entrypoint Combinations
Technical Approach
Related Issues
Notes
This is a significant undertaking but would enable enterprise-grade policy control for institutional users managing treasury keys, staking operations, or DeFi interactions.