Skip to content

Latest commit

 

History

History
107 lines (94 loc) · 15.7 KB

File metadata and controls

107 lines (94 loc) · 15.7 KB

Test Coverage

The tables below provide a summary and detailed information in relation to the number of tests performed, the count of passing tests and the count of failing tests.

To summarise, VeChain is fully compatible with OpenZeppelin contracts (with v5 being the latest version tested), and the main differences encountered are related to Hardhat:

  • The chainId in VeChain is the genesis block ID of each network
  • Custom Hardhat RPC methods like evm_increaseTime or evm_mine depend on the actual Hardhat VeChain plugin (so differences might be expected in this regard).

You can find detailed analysis of the coverage categories in the pages to follow.

OpenZeppelin v5

Summary

CategoryShort DescriptionFailures
Set base URIURI was not set in the ERC721 and ERC721Enumerable test cases, causing 6 tests to remain pending. Since these tests focus on compatibility, URI validation is not essential. 0

Detail

Contract NamePassFailTotalTest Coverage
Total261102617
AccessControl30030
Ownable808
Ownable2Step606
AccessControlDefaultAdminRules56056
AccessControlEnumerable36036
AccessManaged808
AccessManager1130113
AuthorityUtils404
VestingWallet202
Governor1360136
GovernorERC721202
GovernorPreventLateQuorum505
GovernorStorage303
GovernorTimelockAccess303
GovernorTimelockCompound808
GovernorTimelockControl12012
GovernorVotesQuorumFraction404
GovernorWithParams707
Votes44044
ERC2771Context11011
ERC2771Forwarder36036
Clones30030
ERC1967Proxy19019
BeaconProxy606
UpgradeableBeacon606
ProxyAdmin505
TransparentUpgradeableProxy19019
Initializable29029
UUPSupgradeable808
ERC7213750378
ERC721Enumerable3970400
ERC721Wrapper18018
ERC721Holder101
ERC721Burnable505
ERC721Consecutive34034
ERC721Pausable909
ERC721Royalty16016
ERC721URIStorage17017
ERC721Votes23023
ERC721Holder101
ERC115589089
ERC1155Burnable606
ERC1155Pausable11011
ERC1155Supply404
ERC1155URIStorage404
ERC1155Holder707
Address707
Address29029
Arrays20020
Base64505
Context404
Create2808
Multicall404
Nonces606
Pausable11011
ReentrancyGuard606
ShortStrings14014
StorageSlot24024
Strings71071
ECDSA14014
EIP71213013
MerkleProof10010
MessageHashUtils404
ERC165505
ERC165Checker40040
Math44044
SafeCast4440444
SignedMath12012
BitMap10010
Checkpoints33033
DoubleEndedQueue909
EnumerableMap60060
EnumerableSet24024
Time707

OpenZeppelin v4

Summary

CategoryShort DescriptionFailures
JustifiableFailures that result from the inherent design differences between VeChain and Ethereum.73
Contract Address PredictionSee here.14
Failures in ConstructorContract fails in constructor, resulting in failure to be deployed.7
Full, with eth_sign implementationSee here.4
Full, with test changesSome test modifications had to be added for the tests to pass.3
BadBeaconProxy Address 0x1See here.1

Detail

Contract NamePassFailTotalTest CoverageHardhat Total Tests
Total232410224262667
ERC1967Proxy2532828
TransparentUpgradeableProxy5836161
BeaconProxy7299
GovernorTimelockCompound7121919
GovernorCompatibilityBravo7299
TimelockController27154248
CrossChainEnabled491315
GovernorTimelockControl1292121
AccessControl5045480
MinimalForwarder1241615
TokenTimelock3477
VestingWallet2466
ERC721Enumerable2333236236
DoubleEndedQueue7299
ERC2771Context5277
ERC7212112213213
Governor4224444
Checkpoints2212323
ERC11558318484
ERC1155Holder4155
ERC1155PresetMinterPauser1611717
ERC1652133
ERC165Storage4155
ERC20Votes2812929
ERC20VotesComp2712828
ERC721PresetMinterPauserAutoId1511616
ERC721Royalty1311414
GovernorWithParams3144
MerkleProof8199
TimersTimestamp4155
ECDSA1431717
SignatureChecker (ERC1271)1117
ERC1820Implementer1116
ERC777111193
ERC777PresetFixedSupply1116
Address2902929
Arrays1501515
BitMap1001010
Clones3003030
ConditionalEscrow1101111
Context4044
Counters8088
Create28088
EIP7122022
EnumerableMap7007070
EnumerableSet2002424
ERC1155Burnable6066
ERC1155Pausable1101111
ERC1155Supply1001010
ERC1155URIStorage4044
ERC165Checker4004040
ERC201180118118
ERC20Burnable1301313
ERC20Capped5055
ERC20FlashMint1201212
ERC20Pausable1201212
ERC20Permit6066
ERC20PresetFixedSupply4044
ERC20PresetMinterPauser1201212
ERC20Snapshot1401414
ERC46262502525
ERC721Burnable4044
ERC721Consecutive1301313
ERC721Holder1011
ERC721Pausable1001010
ERC721URIStorage1001010
ERC721Votes2602626
Escrow1001010
GovernorComp2022
GovernorERC721Mock2022
GovernorPreventLateQuorum5055
GovernorVotesQuorumFraction6066
Initializable2902929
Math2502525
MulticallToken4044
Ownable6066
Ownable2Step5055
Pausable1101111
PaymentSplitter2002020
ProxyAdmin1201212
PullPayment4044
ReentrancyGuard6066
RefundEscrow1701717
SafeCast4440444444
SafeERC203503535
SafeMath4804848
SignedMath1201212
SignedSafeMath1701717
StorageSlot1201212
Strings3103131
TimersBlockNumber5055
UpgradeableBeacon5055
UUPSUpgradeable6066
Votes2302323