Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: how to recognize a signaling scheme #448

Open
jellegerbrandy opened this issue Jan 17, 2020 · 1 comment
Open

question: how to recognize a signaling scheme #448

jellegerbrandy opened this issue Jan 17, 2020 · 1 comment

Comments

@jellegerbrandy
Copy link
Contributor

So: Ape Unit is developing a signaling schem feature in #427

It works like this:

  • generic actions include, in their ipfs data, a key-value pair and a corresponding action (add, delete, remove)
  • these key-value paris are then indexed in the subgraph

This means that on-chain, there is no such thing as a "signalingscheme contract": it is just a GenericScheme that is treated different in subgraph and alchemy

The question is this:

  • how does the subgraph know which GenericScheme to treat as a signaling scheme (how does the subgraph know for which contracts it needs to look for key-value pairs in the ipfs data)?
  • how will alchemy know if a GenericScheme scheme is to be treated as a signaling scheme?

Example solution (not sure if this is good but would work):

  • a schemeregistrar proposal for adding a new scheme includes in the data on ipfs under "descriptionHash" an (optional) field "typeofScheme"
  • when registering a GenericScheme on proposal execution, the subgraph will read typeofScheme. If typeofScheme === 'SignalingScheme, it will (a) index the signal scheme events as described above and (b) set the name of the scheme to SignalingScheme
  • alchemy can read the scheme name and provide the correct interface
@jellegerbrandy
Copy link
Contributor Author

Maybe even better/easier to implement: just set contractToCall to an agreed-upon valie (say 0x0000000001), and use that.

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

No branches or pull requests

1 participant