Supercolony-net / openbrush-contracts

Home Page:https://openbrush.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library provides implementation on Rust level instead of ink! level

xgreenx opened this issue · comments

ink! doesn't allow to inject code of one contract into another. Because importing another contract without the feature "ink-as-dependency" will generate an entry point for the contract which will conflict with the entry points of the main contract.
Except that we all will have problems with metadata. Because of ink! can't generate metadata for imported crates. We described these issues in more detail here.

It requires us to provide a default implementation on the Rust level. It works and users can override default implementation with their logic but it creates some restrictions and inconveniences during usage of the library.

For example.

In the final vision, we want to have the implementation on the ink! level. But for now, we will develop and simplify usage on Rust level and parallelly will introduce something new to ink!.

This issue will track the migration process from Rust level to ink! when it will possible(after some changes in ink! we will evolve the library to use that changes).