-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test refactoring and explicit revert reasons (#45)
* Test refactoring and check emitted events Simplified and rewritten to use checked reverts Added functions for verifying events emitted by a transaction Cherry-picked from #25 Remove leading underscore in event params Additional event parameters Framework for event checking and TokenManager test impl Check AccessList constructor events using new system Linting Typo Explicit reasons and events for ExternalERC20Storage test remove TODO Linting Check events emitted from upgrade function Group whitelist/blacklist adding commands Use non-blacklisted account for blacklist test Simplify tests and remove rendundants * Check remaining revert reasons and add missing cases * Reinstate gas reporting * Use built-in node assert for code preconditions
- Loading branch information
1 parent
883b47c
commit fd1c7aa
Showing
13 changed files
with
532 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const utils = require('./utils.js'); | ||
|
||
module.exports = utils.makeEventMap({ | ||
// TODO: Implement the constructor using an inheritance system | ||
constructor: (addr) => [{ eventName: 'OwnershipTransferred', | ||
paramMap: { previousOwner: utils.ZERO_ADDRESS, | ||
newOwner: addr } }, | ||
{ eventName: 'WhitelistAdminAdded', | ||
paramMap: { account: addr } }, | ||
{ eventName: 'BlacklistAdminAdded', | ||
paramMap: { account: addr } } | ||
], | ||
addWhitelisted: (addr) => [{ eventName: 'WhitelistAdded', | ||
paramMap: { account: addr } }], | ||
removeWhitelisted: (addr) => [{ eventName: 'WhitelistRemoved', | ||
paramMap: { account: addr } }], | ||
addBlacklisted: (addr) => [{ eventName: 'BlacklistAdded', | ||
paramMap: { account: addr } }], | ||
removeBlacklisted: (addr) => [{ eventName: 'BlacklistRemoved', | ||
paramMap: { account: addr } }] | ||
}); |
Oops, something went wrong.