-
Notifications
You must be signed in to change notification settings - Fork 55
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
base: main
Are you sure you want to change the base?
Conversation
…ng facades Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
@@ -65,6 +69,19 @@ class Utils { | |||
DELEGETABLE_CONTRACT_ID: 4, | |||
}; | |||
|
|||
static async deployContract( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
test/system-contracts/hedera-token-service/hrc-904/IHRC904Proxy.js
Outdated
Show resolved
Hide resolved
test/system-contracts/hedera-token-service/hrc-904/IHRC904Proxy.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
contracts/system-contracts/hedera-token-service/examples/hrc-904/HRC904Contract.sol
Show resolved
Hide resolved
test/system-contracts/hedera-token-service/hrc-904/IHRC904ProxyTests.js
Outdated
Show resolved
Hide resolved
test/system-contracts/hedera-token-service/hrc-904/IHRC904ProxyTests.js
Outdated
Show resolved
Hide resolved
receiver.address | ||
); | ||
const responseCode = await utils.getHTSResponseCode(tx.hash); | ||
expect(responseCode).to.eq('22'); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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
test/system-contracts/hedera-token-service/hrc-904/IHRC904ProxyTests.js
Outdated
Show resolved
Hide resolved
test/system-contracts/hedera-token-service/hrc-904/IHRC904ProxyTests.js
Outdated
Show resolved
Hide resolved
test/system-contracts/hedera-token-service/hrc-904/IHRC904ProxyTests.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Simeon Nakov <[email protected]>
contracts/system-contracts/hedera-token-service/examples/hrc-904/HRC904Contract.sol
Show resolved
Hide resolved
it('should enable unlimited automatic associations for an account', async function () { | ||
const tx = | ||
await walletIHRC904AccountFacade.setUnlimitedAutomaticAssociations( | ||
false, |
There was a problem hiding this comment.
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?
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