Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBrush Milestone 7 #705

Merged
merged 3 commits into from Feb 10, 2023
Merged

OpenBrush Milestone 7 #705

merged 3 commits into from Feb 10, 2023

Conversation

coreggon11
Copy link
Contributor

Milestone Delivery Checklist

Link to the application pull request: w3f/Grants-Program#921 (accepted)
Updates to the application:
w3f/Grants-Program#1149
w3f/Grants-Program#1237
w3f/Grants-Program#1366

Please note, that this is not the same account that opened the original PR, as Toma is not a part of 727.ventures anymore, but updates to this PR were made by this account and approved by the original account.

@Noc2 Noc2 requested a review from takahser January 24, 2023 09:23
@takahser
Copy link
Contributor

Hey @coreggon11
Thanks for your delivery. I'll have a look shortly. I'll keep you posted on the progress.

@takahser takahser self-assigned this Jan 24, 2023
Copy link
Contributor

@takahser takahser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coreggon11 regarding 8b., you'll have to make it public in order to get this delivery approved. I'm quoting our guidelines:

All code produced as part of a grant must be open-sourced, and it must also not rely on closed-source software for full functionality.

Copy link
Contributor

@takahser takahser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coreggon11 also, you seem to not have provided any guide on how to test your delivery. Feel free to add it.
You can find my intermediary evaluation here.

@coreggon11
Copy link
Contributor Author

Hi @takahser , thanks for reply!

You can test openbrush contracts with npm run test to run integration tests (note that you need to run the latest (v 0.23) substrate-contracts-node prior to this), and RUSTFLAGS="-D warnings" cargo +nightly test --workspace --features test-all -- --test-threads=10 to run the unit tests (this repo: https://github.com/727-Ventures/openbrush-contracts). These tests also include the PSP22Pallet tests, which test the communication of the smart contract with the pallet-assets via the chain extension.

You can also test the chain-extension generation with cargo test --workspace --features ink-std (test ink! part of the chain extension) and cargo test --workspace --features substrate-std (test the substrate part of the chain extension) in this repo: https://github.com/727-Ventures/obce

The flow of transition between pallet and contract is described in the readme provided, the readme explains what this standard achieves (standardize assets from pallet-assets) and how one can create PSP22 smart contracts base on the assets from pallet-assets. The medium post we created also describes cross-chain asset transfer, so it can also be used as a guide on how to transfer PSP22Pallet based tokens between chains which don't support smart contracts but do support pallet-assets.

I will update the delivery report to contain this info

@coreggon11
Copy link
Contributor Author

Hi @takahser, please see our upgraded testing guide of this delivery. I have also added it to the application.

Testing this delivery:

  • Deliverable 0b.:
    • The whole flow of the PSP22Pallet and pallet-assets is described in the README provided
  • Deliverables 1,2,3,4:
    • The goal of these deliverables is usage of pallet-assets chain extension within ink! smart contracts to allow communication of the smart contract with the pallet-assets
    • We achieve this by implementing the substrate part of our chain extension in the node, and implementing the ink! part of the chain extension in our smart contract
    • The substrate contracts node (which you can find here already implements the substrate part of the pallet-assets chain extension (Deliverable 1), so we can use this node to test this functionality
    • In OpenBrush we implemented a smart contract with the ink! part of the chain extension (Deliverables 2, 3). You can deploy this contract on your local substrate-contracts-node and test its functionality, or just automatically test it with npm run test (the tests MY_PSP22_PALLET, MY_PSP22_PALLET_BURNABLE, MY_PSP22_METADATA and MY_PSP22_PALLET_MINTABLE are testing the pallet asset chain extension functionality)
    • ink! team created a chain-extension registry which standardizes the chain extensions. Our team registered the pallet-assets chain extension in this commit (completing Deliverable 4)
  • Deliverable 5:
    • Our team created a PR to ink! repository with this functionality. We also added test which tests the cross-contract calls, you can test it by running the ink! unit test with cargo test on these contracts. This functionality works on-chain, the point of the deliverable was adding this utility to off-chain testing environment, so this is the only way you can test this deliverable.
  • Delivearble 6:
    • The pallet-assets already supports XCM, that's why we created an article on how this works, and a guide how to do it on medium.
  • Deliverable 7:
    • OpenBrush now uses ink! 4.0.0-beta, therefore testing the OpenBrush repository either with npm run test (integration tests) or RUSTFLAGS="-D warnings" cargo +nightly test --workspace --features test-all -- --test-threads=10 (unit tests) will show the results of this deliverable (everything works). You can even deploy some of the OpenBrush smart contracts on your local testing node and test its functionality to see that it works.
  • Deliverable 8a.:
    • We created the two tutorials mentioned. This is just the beginning of our tutorial series and there will be more in the future.
  • Deliverable 8b.:
    • We added some SEO to our website, however it may take some time to show results.
  • Notes to testing:
    • Please, make sure that before any tests you meet the following requirements:
      • You have installed the cargo-contract version 2.0.0-beta.1 (cargo install cargo-contract --version 2.0.0-beta.1)
      • You have added the nightly toolchain of rust (rustup toolchain add nightly)
    • When running the integration tests, please make sure you are running a local testing node
      • We recommend (the default) latest version (0.23) of substrate-contracts-node. You can find the node here.

@takahser
Copy link
Contributor

takahser commented Feb 9, 2023

@coreggon11 I updated my evaluation, feel free to have a look.

Copy link
Contributor

@takahser takahser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coreggon11 thanks for your support today, finally we've resolved all the outstanding issues! I'm happy to accept this delivery, you can find my evaluation here.

@takahser takahser merged commit 7691ffb into w3f:master Feb 10, 2023
@RouvenP
Copy link

RouvenP commented Feb 21, 2023

hi @coreggon11 we just transferred the payment.

@coreggon11
Copy link
Contributor Author

@RouvenP hi, thanks for the information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants