cord icon indicating copy to clipboard operation
cord copied to clipboard

[C4GT] Asset: Add tests for `InvalidDigest`

Open vatsa287 opened this issue 1 year ago • 3 comments

Description

Subtask under : https://github.com/cord-network/community/issues/7

New testcase can be tested under cargo test -p pallet-asset after adding it in the code.

Goals

  • [ ] Add tests for InvalidDigest for pallet/asset

Expected Outcome

  • [ ] Test should assert for InvalidDigest being returned properly in all the possible calls.
  • [ ] If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same. Ex: check method asset_create_should_succeed which validates creation of asset.

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts @vatsa287

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

vatsa287 avatar Mar 12 '24 06:03 vatsa287

hey @vatsa287 I would like to work on this . I have gone through the code base can you assign this to me if it is open??

rising0raj avatar Mar 16 '24 20:03 rising0raj

Hey @vatsa287 ! I am interested in contributing to this project and reviewed the prerequisites and code. Can you please assign this issue to me ?

Sohajawdekar avatar Mar 20 '24 20:03 Sohajawdekar

Hello @Sohajawdekar Are you currently open to contributing to the issue? If yes, pls respond or directly raise the PR. Thanks.

VedantKhairnar avatar Aug 23 '24 06:08 VedantKhairnar

hello @vatsa287 can I try on this then ?

Zapper9982 avatar Nov 11 '24 06:11 Zapper9982

@vatsa287 Hi ,it has come to my attention that the InvalidDigest Error hasn't been thrown as error in any function in lib.rs , do i need to create a situation where InvalidDigest is thrown in any function ?

Zapper9982 avatar Jan 09 '25 15:01 Zapper9982

@vatsa287 looking forward to your reply ! :)

Zapper9982 avatar Feb 21 '25 15:02 Zapper9982

Can I be assigned this issue, I am highly motivated to work on it

NishantSinghhhhh avatar Apr 12 '25 21:04 NishantSinghhhhh

Hi @amarts @vatsa287 I'd like to work on this issue. Could you please assign it to me? I’ve gone through the details and I’m ready to start writing the tests for InvalidDigest in the pallet-asset.

Thanks!

Rahulr2101 avatar Apr 18 '25 14:04 Rahulr2101

Hi @amarts and @vatsa287,

I would like to contribute to the task of adding tests for the InvalidDigest error in the pallet-asset for the CORD project. I understand that the goal is to ensure that the InvalidDigest error is returned correctly in all relevant functions.

I have experience working with Rust, and I will refer to other existing test cases, such as the asset_create_should_succeed test, to implement the necessary validation for the InvalidDigest error. The test will ensure that all functions handling this error are validated either as a single test case or multiple ones as needed.

Please assign me this issue, and I will get started on it right away.

Thank you,

rahulbamnuya avatar Apr 20 '25 23:04 rahulbamnuya

We are moving away from the 'asset' pallet described here to pallet/assets instead of what exists now:

https://paritytech.github.io/polkadot-sdk/master/pallet_assets/index.html

Hence, closing this issue.

Refer to https://github.com/dhiway/cord/blob/develop/docs/cord-features.md to get more idea about what you can do.

amarts avatar Apr 21 '25 01:04 amarts