-
Notifications
You must be signed in to change notification settings - Fork 14
Migrate escrow tests to Ethers v6 #199
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
Migrate escrow tests to Ethers v6 #199
Conversation
…w-migr-to-ethers-v6
This reverts commit 4a94fff.
await expect(iexecPocoAsAccountA.depositForArray(...depositForArrayArgs)) | ||
.to.changeTokenBalances( | ||
rlcInstance, | ||
[accountA, iexecPoco], | ||
[-depositTotalAmount, depositTotalAmount], | ||
) | ||
const tx = iexecPocoAsAccountA.depositForArray(...depositForArrayArgs); | ||
await expect(tx).to.changeTokenBalances( | ||
rlcInstance, | ||
[accountA, iexecPoco], | ||
[-depositTotalAmount, depositTotalAmount], | ||
); | ||
await expect(tx) | ||
.to.emit(rlcInstance, 'Transfer') | ||
.withArgs(accountA.address, iexecPoco, depositTotalAmount) |
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.
This assertion is incorrect because there is never a transfer with the full depositTotalAmount
. The check was not being executed because it's chained to to.changeTokenBalances()
. It's fixed in this PR.
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.
Thank you!
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.
some comments
CHANGELOG.md
Outdated
- Deployment scripts (#187) | ||
- Tests | ||
- IexecEscrow (#199) | ||
- ENSIntegration, IexecOrderManagement, IexecRelay (#195) |
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.
- ENSIntegration, IexecOrderManagement, IexecRelay (#195) | |
- ENSIntegration, IexecOrderManagement, IexecRelay (#195, #199) |
CHANGELOG.md
Outdated
- Tests | ||
- IexecEscrow (#199) | ||
- ENSIntegration, IexecOrderManagement, IexecRelay (#195) | ||
- IexecCategoryManager, IexecERC20 (#192) |
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.
- IexecCategoryManager, IexecERC20 (#192) | |
- IexecCategoryManager, IexecERC20 (#192, #199) |
CHANGELOG.md
Outdated
- IexecCategoryManager, IexecERC20 (#192) | ||
- test/*fullchain* (#190) | ||
- IexecAccessors (#189, #191) | ||
- IexecAccessors, IexecMaintenance (#189, #191) |
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.
- IexecAccessors, IexecMaintenance (#189, #191) | |
- IexecAccessors, IexecMaintenance (#189, #191, #199) |
export async function hashDomain(domain: IexecLibOrders_v5.EIP712DomainStructOutput) { | ||
return ethers.TypedDataEncoder.hashDomain({ | ||
name: domain.name, | ||
version: domain.version, | ||
chainId: domain.chainId, | ||
verifyingContract: domain.verifyingContract, | ||
}); | ||
} |
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.
i think we can remove buildDomain
function if we have that
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.
Removed
package.json
Outdated
"sol2uml": "After 2.5.19, see https://github.com/naddison36/sol2uml/issues/183" | ||
} | ||
} | ||
} |
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.
EOF
test/utils/utils.ts
Outdated
* | ||
* Note: sending ETH to address(0) does not increment its balance. | ||
*/ | ||
export async function setZeroAddressBalance(amount: bigint) { |
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.
Set 10n input by default ?
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.
Done
…w-migr-to-ethers-v6
Next PR:
scripts/test/run-native-tests.sh
.