Context
Currently, all circuits (token transfer, token transfer v2, trivial logic) are located in https://github.com/anoma/anomapay-backend-multichain.
The new generic call circuit prototype is more general than just AnomaPay and it should be moved in its own repository, also to be able to separately audit it from all the backend code in the future. Maybe the other circuits can be moved as well at a later point. This would allow to selectively open-source the circuits.
Scope
Move the code
generic_call_circuit,
generic_call_library, and
generic_call_witness
from the https://github.com/anoma/anomapay-backend-multichain/tree/feature/generic-call-resource branch into the new https://github.com/anoma/generic-call-resource repo.
Figure out how the backend could import the crate and how to handle the traits. Another difficulty might be how testing can be done without the backend infrastructure.
It should be possible to publish the repo as one or multiple crates.
Definition of Done
The new repo works and is imported in the backend. Importing it as git dependency is ok for now since this is a prototype and we don't have to publish a crate yet. It is also acceptable to release an 1.0.0-alpha.0 version or similar on crates.io.
Context
Currently, all circuits (token transfer, token transfer v2, trivial logic) are located in https://github.com/anoma/anomapay-backend-multichain.
The new generic call circuit prototype is more general than just AnomaPay and it should be moved in its own repository, also to be able to separately audit it from all the backend code in the future. Maybe the other circuits can be moved as well at a later point. This would allow to selectively open-source the circuits.
Note
The associated
GenericCallForwardercontract can be found here: https://github.com/anoma/generic-call-forwarderScope
Move the code
generic_call_circuit,generic_call_library, andgeneric_call_witnessfrom the https://github.com/anoma/anomapay-backend-multichain/tree/feature/generic-call-resource branch into the new https://github.com/anoma/generic-call-resource repo.
Figure out how the backend could import the crate and how to handle the traits. Another difficulty might be how testing can be done without the backend infrastructure.
It should be possible to publish the repo as one or multiple crates.
Note
There is an integration test branch by @sug0 on top of https://github.com/anoma/anomapay-backend-multichain/tree/feature/generic-call-resource. It would be good if these tests can still work.
Definition of Done
The new repo works and is imported in the backend. Importing it as git dependency is ok for now since this is a prototype and we don't have to publish a crate yet. It is also acceptable to release an
1.0.0-alpha.0version or similar on crates.io.