smartcontractkit / smartcontractkit/chainlink-ace

Feature Request (DX) - introduce structure to send multiples contexts for several policies at the same time

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Solidity
Stars
22
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Hi ACE Team,

My name is Vitali Grabovski, and I have been working on on-chain compliance infrastructure for five years at my company.
I came across this project through a thread on the Ethereum Magicians forum where someone asked about the similarities and differences between ACE and ERC-8006. That discussion caught my attention and motivated me to create this issue.

Motivation
What I found missing in ace is a lack of standardized way to provide context for multiple policies. It seems that when 3 or more policies share the same context, the lack of a defined structure for context can quickly become a mess.

Suggested Approach
Based on this, I think the following points are missing:

  • context should be supplied for every policy that requests it

  • empyt context should be supplied for every other policy

  • each requested context should be validated against non-zero value

  • each requested context should be validated against valid payload

  • each policy should know how to retrieve its own context from the shared context returned by getContext(); alternatively, the specific policy context must be provided to the policy

Without such standardization, developers will likely need to implement ad hoc methods such as setContextA(), setContextB(), setContextC(), ..., setContextX() in contracts that inherit from PolicyProtected.

In addition, getContext() ends up taking responsibility for packing the context payloads for each policy, including zero payloads for those that don't require context. Developers are forced to override getContext() to implement their own packing logic.

Most importantly, every policy must then implement custom unpacking code that depends on the specific getContext() implementation written by the developer. DX significantly degrades this way.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the PolicyProtected contract and the getContext() flow, then trace how policies currently receive, validate, and unpack context. Define the scope and acceptance criteria for a standardized multi-policy context structure, including empty contexts and policy-specific retrieval, before identifying the affected contracts and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.