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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds tests that verify IHRC904Proxy methods targeted to an EOA are functional when called by EOA #1186

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

simzzz
Copy link
Contributor

@simzzz simzzz commented Jan 17, 2025

Description:
This PR adds tests that verify IHRC904Proxy methods targeted to an EOA are functional when called by EOA

Related issue(s):
Closes #1147

Notes for reviewer:

Checklist

  • Tested (unit, integration, etc.)

@quiet-node quiet-node added the enhancement New feature or request label Jan 17, 2025
@quiet-node quiet-node added this to the 0.12.0 milestone Jan 17, 2025
@@ -65,6 +69,19 @@ class Utils {
DELEGETABLE_CONTRACT_ID: 4,
};

static async deployContract(
Copy link
Contributor

Choose a reason for hiding this comment

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

There will be a conflict, since I saw this in another PR as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're all the same so I think if we merge one it should be fine? On a second thought it would have been better to do a separate PR for the util functions + constants but I didn't want to manage one more issue from a forked repo

@simzzz simzzz requested a review from konstantinabl January 29, 2025 09:05
receiver.address
);
const responseCode = await utils.getHTSResponseCode(tx.hash);
expect(responseCode).to.eq('22');
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way to verify that this airdrop has been removed from the pending airdrop list or maybe ensure it is no longer available or something like that? If so we can also add the verification to other tests where appropriate also.

}
);
const responseCode = await utils.getHASResponseCode(tx.hash);
expect(responseCode).to.eq('22');
Copy link
Member

Choose a reason for hiding this comment

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

Same here—can we check the account status to confirm if unlimited automatic associations are enabled? Maybe through the Mirror Node, SDK, or something similar? Just want to ensure that even with code 22, the operation actually updates the state.


const tx = await walletIHRC904TokenFacadeReceiver.claimAirdropFT(owner);
const responseCode = await utils.getHTSResponseCode(tx.hash);
expect(responseCode).to.eq('22');
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can ensure the receiver balance increased or something?

await airdrop.wait();
const tx = await walletIHRC904TokenFacadeReceiver.rejectTokenFT();
const responseCode = await utils.getHTSResponseCode(tx.hash);
expect(responseCode).to.eq('22');
Copy link
Member

Choose a reason for hiding this comment

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

Maybe check all the pending airdops are indeed wiped off

Signed-off-by: Simeon Nakov <[email protected]>
@simzzz simzzz requested a review from quiet-node January 30, 2025 15:10
it('should enable unlimited automatic associations for an account', async function () {
const tx =
await walletIHRC904AccountFacade.setUnlimitedAutomaticAssociations(
false,
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm now I look at this why would this be false if we want to unable it? Shouldn't it be true?

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

Successfully merging this pull request may close these issues.

Add tests that verify IHRC904Proxy methods targeted to an EOA are functional when called by EOA
3 participants