-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use runtime managed ERC20 tokens in tests #26
Comments
Hey team! Please add your planning poker estimate with Zenhub @gianfra-t @b-yap @ebma |
@pendulum-chain/product The purpose of this ticket is to change the Nabla tests to actually tokens managed in our runtime (which is our use case) opposed to assets managed in ERC20 contracts (which is the default in the Nabla tests). This has high priority as this is required for successfully testing Nabla. |
One question to clarify, when deploying multiple instances of |
That is a good point and indeed there is no one stopping you to deploy wrapper contracts that point to the same token. This is potentially confusing but no logical insecurity. The copy wrapper contract can do exactly what the original can do and any user could call into either one if they wanted to. |
What's our plan with the foucoco-standalone project? Is it just a temporary solution or are we planning to keep it? |
@ebma Yes, we should use the common chain extension here plus the additional mint and burn features. I would rather not have to keep Foucoco standalone around and rather use our normal Foucoco. However,
Do you see a more elegant solution how we can have this "testable" version of Foucoco without needing to maintain this extra repo? |
The main difference is the import of |
No, the main difference is that this uses manual seal, that means that blocks are immediately produced when a transaction is submitted. Otherwise testing would take a long time. I don't know how to make manual seal work for Foucoco as this would need to happen in sync with the relay chain, i.e., we would not to run a local relay and parachain and both need to use manual seal. Could be a research task of course. |
Closing this as it has already been part of #23 |
About the manual-seal, we can add this to all our runtimes (or some of them) and enable it with a conditional flag. |
Nice find with the instant seal feature. Would make a lot of sense to add this. Do you know how that works with the relay chain? For the skip block feature: one option would be to add use the altered pallet-contracts directly in Foucoco or use a feature flag. Nevertheless, I added this research ticket: https://github.com/pendulum-chain/tasks/issues/190 |
No, unfortunately I don't really. I assume that they only use it for their integration tests. While in our Spacewalk integration tests, we use a custom standalone chain that we configured to be usable with manual seal, I assume for their integration tests they launch a custom mock network and connect their runtimes to that with instant seal enabled. With the advantage of being able to use and test their production runtime instead of a custom one. |
It's not super urgent as Foucoco-standalone is good enough for our current needs but in the future it is worthwhile to use this solution to avoid maintenance cost. I created this research ticket: https://github.com/pendulum-chain/tasks/issues/235 |
The Nabla test use a
MockERC20
contract. These contracts are an extension of the default open zeppelin ERC20 contracts with additional mint and burn functions.These contracts should be replaced with the
ERC20Wrapper
contracts defined in thependulum-ink-wrapper
. However, this contract does not have mint and burn functions and the chain extensions in the foucoco-standalone chain doesn't provide this functionality either.TODO
TestableERC20Wrapper
contract to the pendulum-ink-wrapper repository that has burn and mint functions and that uses the chain extensionsMockERC20
definition innabla/config.json
by referring to theTestableERC20Wrapper
contractThe text was updated successfully, but these errors were encountered: