pendulum-chain / pendulum

GNU General Public License v3.0
43 stars 14 forks source link

Extract `chain_extension` implementation and re-use it in all runtimes #249

Closed ebma closed 3 months ago

ebma commented 1 year ago

We want to use the same chain_extension implementation in all our runtimes. In order not to duplicate any code, we should extract the implementation of the chain_extension into another directory, similar to what Astar did here, and re-use that in each runtime.

To add a bit more structure, we can even split our current chain extension into two sub-parts: a 'token-extension' which is comprised of the functions with ID 1100-1199 and a 'price-extension' which consists of functions with ID 1200-1299. Astar also found a way to use register three chain extensions at the same time, see here.

ebma commented 10 months ago

@pendulum-chain/product this ticket should be prioritized soon. Having this for before Nabla launch would be good, because otherwise we have to duplicate code once we want to use our Solidity wrapper contract solution also on Pendulum.

prayagd commented 9 months ago

Hey team! Please add your planning poker estimate with Zenhub @adelarja @b-yap @ebma @TorstenStueber

TorstenStueber commented 6 months ago

@prayagd @ebma can we move this ticket to Ready? Any reason why not?

ebma commented 6 months ago

We can move it already but should only work on it once #356 is merged.

prayagd commented 4 months ago

@ebma just to check this is important for the Nabla mainnet launch right?

ebma commented 4 months ago

It's a chore and so is not a stopper for anything. It's about refactoring some code and wouldn't add or remove any functionalities. We should still do it eventually and I wouldn't like to have it in the icebox.