Advertisement
dvmir

AccessControl.test.js

Dec 18th, 2021
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.39 KB | None | 0 0
  1. npx hardhat test ./test/access/AccessControl.test.js
  2. ========================== Reading Hardhat config =============================
  3. address from = 0xceb35C58F3811b6bAC6c181cCb95E1DB083aA935 balance= 1000000000000000000000
  4. address to = 0x8B15609c9e119bF23525890297f83AD4a2bB83fa balance= 1000000000000000000000
  5. main private key = 0xd3927271148e876e0cee36b1850bd5c59a0deed074c575f13e3ff17fd0e3bd02
  6. account keys = 0xd3927271148e876e0cee36b1850bd5c59a0deed074c575f13e3ff17fd0e3bd02,0x38b5513a3f2b877f1479937b683e3d0e79cd3f17f0740255198a936e0d966811,0xd090645f6b1c22478f497f126d33344bd75484077a83ee56f184febe3dda656b,0x128fa8dd0e789fbc71fc5518b99d25c469a63183ea8f42f6745f7186ad457696,0xcbff6e1eed8bc5f7cb129ebe0462cd5846efb2c214bc3b4166cac4d22196c266,0x5ed5c266f8bf0175bc7285e92dedf806a0a3daaa09a46c70861f353425710d36,0xd1800b73816cd4c5571c66bef27c7eb36888cddd86ca150146480ddeea49b605,0x0bc28b824d8fc88feeb42194951e1c941daa2e98ecbe10c263124f53992badcd,0x2ca4d010cd98eae41ced673bf94c54a42824c50f22eb288654f3b541ff40743f,0xd4c8350cdcb941a26caf19d8bb59e861eefdfc6eb5e5fa4d03129a2a9b0b29ec,0x750609c7ae4ebc4a918c340e9ef7a5b106d092cb99315767d1e2da62b2f383c7,0x1a0c515e959393c28afb3d3fe7eb7f66edae35c826ff80a147f00faba2fc077d,0xfb8fa90bb11be13d94754cc44b9f044cc3e1af9facad5da8cad0266b405e9adf,0x8d2197d0e60ba0b9296532279d6833c0cb371ccc8ded81cfb991066a628d7f95,0x927c4efbe816b528b354d87b6be304defa63c02686e54079e9e9b3cabd211718,0x3ad31d2d17f2b94306cf8f902d6094f17eda36d265c6ac90adafb20fb62ffce1
  7. ==============================================================================
  8. (node:3571227) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/ubuntu/tests/neon-compatibility/openzeppelin-contracts/node_modules/ansi-mark/package.json' of 'ansi-mark'. Please either fix that or report it to the module author
  9. (Use `node --trace-deprecation ...` to show where the warning was created)
  10. (node:3571227) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/ubuntu/tests/neon-compatibility/openzeppelin-contracts/node_modules/super-split/package.json' of 'super-split'. Please either fix that or report it to the module author
  11.  
  12.  
  13. Contract: AccessControl
  14. Contract interface
  15. AccessControl
  16. ERC165's supportsInterface(bytes4)
  17. ✔ uses less than 30k gas [skip-on-coverage] (526ms)
  18. ✔ claims support [skip-on-coverage] (438ms)
  19. hasRole(bytes32,address)
  20. ✔ has to be implemented
  21. getRoleAdmin(bytes32)
  22. ✔ has to be implemented
  23. grantRole(bytes32,address)
  24. ✔ has to be implemented
  25. revokeRole(bytes32,address)
  26. ✔ has to be implemented
  27. renounceRole(bytes32,address)
  28. ✔ has to be implemented
  29. default admin
  30. ✔ deployer has default admin role (420ms)
  31. ✔ other roles's admin is the default admin role (436ms)
  32. ✔ default admin role's admin is itself (416ms)
  33. granting
  34. @openzeppelin/test-helpers WARN expectRevert: Assertions may yield false negatives!
  35.  
  36. Revert reason checks are only known to work on Ganache >=2.2.0 and Hardhat, and the current node is Neon/v0.5.0-2f0d1f65eb65e2d83ceac654502cb50e64646d36.
  37.  
  38. If your node does support revert reasons, please let us know: https://github.com/OpenZeppelin/openzeppelin-test-helpers/issues/new
  39. ✔ non-admin cannot grant role to other accounts (883ms)
  40. ✔ accounts can be granted a role multiple times (3917ms)
  41. revoking
  42. ✔ roles that are not had can be revoked (2554ms)
  43. with granted role
  44. ✔ admin can revoke role (2331ms)
  45. ✔ non-admin cannot revoke role (904ms)
  46. ✔ a role can be revoked multiple times (5293ms)
  47. renouncing
  48. ✔ roles that are not had can be renounced (1735ms)
  49. with granted role
  50. ✔ bearer can renounce role (2195ms)
  51. ✔ only the sender can renounce their roles (857ms)
  52. ✔ a role can be renounced multiple times (4058ms)
  53. setting role admin
  54. ✔ a role's admin role can be changed (502ms)
  55. ✔ the new admin can grant roles (1882ms)
  56. ✔ the new admin can revoke roles (3976ms)
  57. ✔ a role's previous admins no longer grant roles (928ms)
  58. ✔ a role's previous admins no longer revoke roles (943ms)
  59. onlyRole modifier
  60. ✔ do not revert if sender has role (1929ms)
  61. ✔ revert if sender doesn't have role #1 (943ms)
  62. ✔ revert if sender doesn't have role #2 (898ms)
  63.  
  64.  
  65. 28 passing (4m)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement