pendulum-chain / pendulum-solidity-wrapper

PSP Pendulum ink! smart contract designed to provide access to any currency on top of substrate pendulum chain via chain extension.
GNU General Public License v3.0
0 stars 0 forks source link

Create automatic testing suite for ERC20 and oracle wrapper contracts #20

Open ebma opened 1 year ago

ebma commented 1 year ago

Context

Our wrapper contracts are using the chain extension, so we have to compile them to WASM. Meaning we cannot use testing suites for EVM contracts but we can also not write unit tests to the same file. We could, however, have tests that deploy the contracts to our chain and then do automated tests with the deployed contracts.

Solang is doing tests similar to this. They define some helper functions here and in their actual test implementation (e.g. this), they use those helper functions to deploy and interact with the contracts on-chain, asserting certain values as results of the interactions.

Solution

We will create an automatic testing suite that uses a local standalone chain to deploy and interact with the compiled smart contracts. The standalone chain features the exact same chain extension that is also live on Pendulum/Amplitude/Foucoco.

Tasks

ebma commented 1 year ago

Hey team! Please add your planning poker estimate with Zenhub @ashneverdawn @TorstenStueber

prayagd commented 9 months ago

@ebma does the wasm-deploy what this ticket says and can we close this ticket?

ebma commented 9 months ago

We can use wasm-deploy to facilitate the testing described in this ticket. We shouldn't close it though as we still need to actually implement the testing for these specific contracts.

prayagd commented 9 months ago

ok got it, Moving it to icebox then as wasm deploy not priority right now