Closed pgherveou closed 11 months ago
I love the direction of this changes, that would finally allow to work freely with any runtime, not only for contract purposes, but for general interaction as well
if I understand the intention correctly, the idea is that:
* `Sandbox` essentially wraps externalities and has a generic argument for a runtime, which can be actually anyhow configured * depending on this generic argument, `Sandbox` enables pallet-specific operations, but not through traits (`like ChainApi` and `ContractApi`), but rather through generic bounds
is that so?
Yes. That's pretty much what Sandbox was doing already (as far as I understand). I just moved the constraints around to make it more flexible and work with any Runtime as long as they implement the right config. We could re-introduce the traits and implement them for runtime that implement the right configs but I don't think it's necessary, simple generics bounds implementation should be enough here.
Addressed your comments
@deuszx @pmikolajczyk41 not sure what kind of approval is required to trigger CI here, you mind re-approving so we can merge this asap?
This PR does the following refactoring, to prepare further update that will make it easier to integrate Drink with a Network of chains connected through XCM:
Specifically it does the following:
For example token APIs only require the Sandbox to be generic over something that implement pallet_contracts