From f2e936fd83c824c0148e4bdff5ccab674b37977a Mon Sep 17 00:00:00 2001
From: valeriacaracciolo <71491710+valeriacaracciolo@users.noreply.github.com>
Date: Mon, 30 Oct 2023 21:16:36 +0100
Subject: [PATCH 1/2] Add CoinFabrik_On_Ink_Integration_Tests-2
---
.../CoinFabrik_On_Ink_Integration_Tests-2.md | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md
diff --git a/deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md b/deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md
new file mode 100644
index 000000000..c62dccf58
--- /dev/null
+++ b/deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md
@@ -0,0 +1,38 @@
+# Milestone Delivery :mailbox:
+
+
+**The [invoice form :pencil:](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform) has been filled out correctly for this milestone and the delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/milestone-deliverables-guidelines.md).**
+
+* **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/CoinFabrik_On_Ink_Integration_Tests_2.md
+* **Milestone Number:** 1
+
+**Context** (optional)
+
+For this milestone, we developed missing functionalities for integration tests, and corrected implementation differences when compared to end-to-end (e2e) tests, for the following functions: default_accounts(), set_contract_storage(), and instantiate_contract().
+
+Additionally, we provide [documentation and test cases](https://github.com/CoinFabrik/on-ink-integration-tests/tree/milestone-on-ink-integration-tests-2/test-cases) for all the 24 functions exposed for use in integration and E2E testing environments. This includes highlighting behavioral and implementation differences, as well as suggesting implementation plans for any necessary corrections.
+
+We documented our work in a [milestone report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf). All analysis work linked in the report can be found in our [analysis repository](https://github.com/CoinFabrik/on-ink-integration-tests/tree/milestone-on-ink-integration-tests-2).
+
+**Deliverables**
+
+| Number | Deliverable | Link | Notes |
+| ----- | ----------- | ------------- |------------- |
+| 0a. | License | https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/LICENSE | MIT |
+| 0b. | Documentation | https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf | We deliver a comprehensive report comparing the functionalities of integration tests and E2E (End-to-End) tests. The focus of this report is on the functions to be implemented or corrected in this milestone, corresponding to issues: 1-default_accounts(), 2-set_contract_storage(), and 7-instantiate_contract().
We also provide [documentation and test cases](https://github.com/CoinFabrik/on-ink-integration-tests/tree/milestone-on-ink-integration-tests-2/test-cases) for the 13 functions with pending analysis, completing our analysis of the 24 functions exposed for integration and e2e tests.
+| 0c. | Testing and Testing Guide | - | We followed existing [contribution guidelines](https://github.com/paritytech/ink/blob/master/CONTRIBUTING.md) for the pull requests associated with the implementations of functions: default_accounts(), set_contract_storage() and instantiate_contract(). For these functions, we added test cases in their target directories correspondingly. We include a testing guide on how to execute these tests in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), on `Reference 1: Implementation Summary` of section `Execution` of the `Appendix 1`, and in the documentation of each corresponding pull request.
+| 0d. | Docker | - | Does not apply at this stage.
+| 0e. | Article | https://www.coinfabrik.com/blog/implementing-missing-functionalities-on-ink-integration-tests | We prepared a summary report and published it on our blog https://blog.coinfabrik.com/ under the name `Implementing Missing Functionalities On Ink Integration Tests`.
+ **1** | Develop | [PR1-default_accounts()](https://github.com/paritytech/ink/pull/1955), [PR2-set-account_storage()](https://github.com/paritytech/ink/pull/1961), [PR3-instantiate-contract()](https://github.com/paritytech/ink/pull/1963) | We provide implementations for the three functions specified in this milestone: [default_accounts()](https://github.com/paritytech/ink/pull/1955), [set_contract_storage()](https://github.com/paritytech/ink/pull/1961) and [instantiate_contract()](https://github.com/paritytech/ink/pull/1963). Check further documentation on these developments in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), in the `Reference 1: Implementation Summary` of the section `Execution` of the `Appendix 1`.
On the other hand, as we worked on integrating our test cases into CI/CD, we identified a bug when building e2e tests in a workspace. Concretely, we noticed that the build for e2e tests failed when running cargo-contract inside a workspace package, and if any dependency was inherited from the workspace definition. We performed a pull request to the cargo-contract repository implementing a [fix](https://github.com/paritytech/cargo-contract/pull/1358) to this issue. Check further documentation on this development in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), in the subsection `Ad-hoc developments` of the section `Execution` of the `Appendix 1`.
+ **2** | Review and Estimate | https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf | We performed a review of the 13 functions with pending analysis and found implementation differences between integration and e2e tests for the functions balance() and weight_to_fee(). For balance() we provide an implementation estimate. For weigh_to_fee() we provide documentation of the problem and an associated test case; the issue occurs on the e2e environment and needs to be discussed with the responsible team before moving forward. Check documentation of these reviews and estimates in our report, on `Reference 2: Findings and Estimation` of section `Further Analysis and Estimation` of the `Appendix 1`.
+ **3** | Quality Assurance | - | We reviewed and followed the established [contribution guidelines](https://github.com/paritytech/ink/blob/master/CONTRIBUTING.md) for the three pull requests performed: [PR1-default_accounts()](https://github.com/paritytech/ink/pull/1955), [PR2-set-account_storage()](https://github.com/paritytech/ink/pull/1961), [PR3-instantiate-contract()](https://github.com/paritytech/ink/pull/1963).
+
+
+
+**Additional Information**
+
+- How did you hear about the Grants Program? Richard Casey from Parity brought this program to our attention, and we have already successfully delivered two applications as a result.
+
+- During our inquiries for this application, we briefly consulted Sam Ruberti from the ink! Team and David Hawig from the Web3 Foundation. Their encouragement motivated us to proceed with this presentation.
+
+- Next Steps: After completing this milestone, we will submit a new grant proposal for the development of the remaining functions that either lack implementations in integration tests or exhibit differences when compared to E2E tests.
From 76a70926b66a6e84802c3b8a404f9ec9e96e4de4 Mon Sep 17 00:00:00 2001
From: valeriacaracciolo <71491710+valeriacaracciolo@users.noreply.github.com>
Date: Thu, 16 Nov 2023 16:16:49 -0300
Subject: [PATCH 2/2] Update PRs in CoinFabrik_On_Ink_Integration_Tests-2.md
We explain below two changes that we had to perform to ensure that our PRs passed the corresponding checks, and to be consistent with new developments we have performed on other unimplemented functions in integration tests.
We initially performed the Pull Request [#1963](https://github.com/paritytech/ink/pull/1963) to implement instantiate_contract(), but decided to close it and perform a new Pull Request [#1988](https://github.com/paritytech/ink/pull/1988) to include necessary implementations of other related functions, which were developed as a subsequent milestone to this Milestone 2. These functions were all related to each other, and a single PR seemed like the tidiest option.
As part of an ad-hoc development in PR [#58] (https://github.com/paritytech/cargo-contract/pull/1358), adding support to workspaces, we were requested to ensure that ink-examples worked correctly with this implementation. We initially performed the Pull Request [#44](https://github.com/paritytech/ink-examples/pull/44) to show this. However, we had to close this PR because some modifications needed to be performed for checks to pass. We made these changes in Pull Request [#52](https://github.com/paritytech/ink-examples/pull/52).
We updated the Milestone Report and Table of Deliveries to reflect these final changes.
---
deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md b/deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md
index c62dccf58..8c1ff5a5b 100644
--- a/deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md
+++ b/deliveries/CoinFabrik_On_Ink_Integration_Tests-2.md
@@ -23,9 +23,9 @@ We documented our work in a [milestone report](https://github.com/CoinFabrik/on-
| 0c. | Testing and Testing Guide | - | We followed existing [contribution guidelines](https://github.com/paritytech/ink/blob/master/CONTRIBUTING.md) for the pull requests associated with the implementations of functions: default_accounts(), set_contract_storage() and instantiate_contract(). For these functions, we added test cases in their target directories correspondingly. We include a testing guide on how to execute these tests in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), on `Reference 1: Implementation Summary` of section `Execution` of the `Appendix 1`, and in the documentation of each corresponding pull request.
| 0d. | Docker | - | Does not apply at this stage.
| 0e. | Article | https://www.coinfabrik.com/blog/implementing-missing-functionalities-on-ink-integration-tests | We prepared a summary report and published it on our blog https://blog.coinfabrik.com/ under the name `Implementing Missing Functionalities On Ink Integration Tests`.
- **1** | Develop | [PR1-default_accounts()](https://github.com/paritytech/ink/pull/1955), [PR2-set-account_storage()](https://github.com/paritytech/ink/pull/1961), [PR3-instantiate-contract()](https://github.com/paritytech/ink/pull/1963) | We provide implementations for the three functions specified in this milestone: [default_accounts()](https://github.com/paritytech/ink/pull/1955), [set_contract_storage()](https://github.com/paritytech/ink/pull/1961) and [instantiate_contract()](https://github.com/paritytech/ink/pull/1963). Check further documentation on these developments in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), in the `Reference 1: Implementation Summary` of the section `Execution` of the `Appendix 1`.
On the other hand, as we worked on integrating our test cases into CI/CD, we identified a bug when building e2e tests in a workspace. Concretely, we noticed that the build for e2e tests failed when running cargo-contract inside a workspace package, and if any dependency was inherited from the workspace definition. We performed a pull request to the cargo-contract repository implementing a [fix](https://github.com/paritytech/cargo-contract/pull/1358) to this issue. Check further documentation on this development in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), in the subsection `Ad-hoc developments` of the section `Execution` of the `Appendix 1`.
+ **1** | Develop | [PR1-default_accounts()](https://github.com/paritytech/ink/pull/1955), [PR2-set-account_storage()](https://github.com/paritytech/ink/pull/1961), [PR3-instantiate-contract()](https://github.com/paritytech/ink/pull/1988) | We provide implementations for the three functions specified in this milestone: [default_accounts()](https://github.com/paritytech/ink/pull/1955), [set_contract_storage()](https://github.com/paritytech/ink/pull/1961) and [instantiate_contract()](https://github.com/paritytech/ink/pull/1988). Check further documentation on these developments in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), in the `Reference 1: Implementation Summary` of the section `Execution` of the `Appendix 1`.
On the other hand, as we worked on integrating our test cases into CI/CD, we identified a bug when building e2e tests in a workspace. Concretely, we noticed that the build for e2e tests failed when running cargo-contract inside a workspace package, and if any dependency was inherited from the workspace definition. We performed a pull request to the cargo-contract repository implementing a [fix](https://github.com/paritytech/cargo-contract/pull/1358) to this issue. Check further documentation on this development in [our report](https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf), in the subsection `Ad-hoc developments` of the section `Execution` of the `Appendix 1`.
**2** | Review and Estimate | https://github.com/CoinFabrik/on-ink-integration-tests/blob/milestone-on-ink-integration-tests-2/assets/On-Ink-Integration-Tests-2-Milestone-Report.pdf | We performed a review of the 13 functions with pending analysis and found implementation differences between integration and e2e tests for the functions balance() and weight_to_fee(). For balance() we provide an implementation estimate. For weigh_to_fee() we provide documentation of the problem and an associated test case; the issue occurs on the e2e environment and needs to be discussed with the responsible team before moving forward. Check documentation of these reviews and estimates in our report, on `Reference 2: Findings and Estimation` of section `Further Analysis and Estimation` of the `Appendix 1`.
- **3** | Quality Assurance | - | We reviewed and followed the established [contribution guidelines](https://github.com/paritytech/ink/blob/master/CONTRIBUTING.md) for the three pull requests performed: [PR1-default_accounts()](https://github.com/paritytech/ink/pull/1955), [PR2-set-account_storage()](https://github.com/paritytech/ink/pull/1961), [PR3-instantiate-contract()](https://github.com/paritytech/ink/pull/1963).
+ **3** | Quality Assurance | - | We reviewed and followed the established [contribution guidelines](https://github.com/paritytech/ink/blob/master/CONTRIBUTING.md) for the three pull requests performed: [PR1-default_accounts()](https://github.com/paritytech/ink/pull/1955), [PR2-set-account_storage()](https://github.com/paritytech/ink/pull/1961), [PR3-instantiate-contract()](https://github.com/paritytech/ink/pull/1988).