inkdevhub / drink

De-chained Ready-to-play ink! playground
Apache License 2.0
69 stars 15 forks source link

Rename & update SandboxConfig trait #105

Closed pgherveou closed 7 months ago

pgherveou commented 8 months ago

Follow up from #99

I realized that the current design was not working as I wanted. Specifically, when working with parachain and xcm_simulator::TestExt, I need to use the existing externalities, and the custom execute_with to dispatch messages properly.

These updates let us create custom sandbox environment that have full control over the storage and execution. An example of this, is the MockNetworkSandbox defined in ink! that uses under the hood the xcm simulator to test connected smart contract that need to interact with a Network of chains.

pgherveou commented 8 months ago

@deuszx @pmikolajczyk41 updated the initial fix.

To avoid using the hacky RefCell & thread_local solution, I updated (one more time 😓) how everything is setup.

This needs another pass to make sure some doc string are still up to date, but hopefully this address your concern.

deuszx commented 8 months ago

Thanks @pgherveou , I'll review it this week. Also, before I forget, remember to bump minor version of the crate.

pgherveou commented 8 months ago

Thanks @pgherveou , I'll review it this week. Also, before I forget, remember to bump minor version of the crate.

Gentle ping for review 🙏

pgherveou commented 7 months ago

@deuszx you are still blocking this, would be nice if you could remove the "change requested" or delegate your review to someone else?