ApeWorX Ltd.
banner
apeworx.io
ApeWorX Ltd.
@apeworx.io
The most advanced smart contract framework on earth. Trusted by Yearn, Lido, Curve, Element and more

Join us → discord.gg/apeworx

apeworx.io
To see the second part of our coverage series, follow our @viamirror account or join our discord to get early access to all our blogs (and also a special treat)

discord.com/invite/apeworx
July 21, 2023 at 8:55 PM
But this is only the ELI5!

If you want to know what the difference is between things like Statement, Branch, and Condition coverage then read through the full post to know everything
July 21, 2023 at 8:55 PM
It's an incredibly useful part of your toolset, but you need to pair it with fuzzing, 3rd party review, and just spending time finding unorthodox attack vectors that no tool could predict to truly lower the chances of your project becoming the next front page headline
July 21, 2023 at 8:55 PM
So very high coverage is a necessary but not sufficient condition for having good unit tests

It's a nice thing to have, but not necessarily the end goal
July 21, 2023 at 8:54 PM
High coverage just shows that your code does something during the test, not what that it is doing the right thing

Relying on it as a way to know if something is secure is the path to getting hacked by a teenager in a basement blaring dubstep
July 21, 2023 at 8:54 PM
100% coverage doesn't mean that your code was fully tested, bulletproof, and can survive North Korean hackers

It just means that all the lines of your source code were executed at least once during your test suite
July 21, 2023 at 8:54 PM
So if you have 80% coverage then 80% of your code is being exercised by whatever tests are running on your code base.

Generally, the more % covered the better

However....
July 21, 2023 at 8:54 PM
So wtf is coverage, does it even matter, and do you need to achieve 100% coverage or will your code explode?

Well yes, but also no, but also kinda

Lets step back and cover the basics

"Code coverage" refers to the amount of your code which is checked by automated testing
July 21, 2023 at 8:54 PM
*wipes brow*

Aaaand that's it! Stay tuned for the coverage post, more updates, and what we've been doing at #EthCC!

If you wanna chat a bit, feel free to hit up our discord, we'd love to hang out and help with whatever you're making:

https://discord.com/invite/apeworx
July 19, 2023 at 2:20 AM
feat: improved error message for ArgumentsLengthError

Small fix, great fix.

We made error feedback just that little bit better
July 19, 2023 at 2:20 AM
Configure your dependencies, compilers, and projects in any way you like! This gives you so much control you can comb through and tweak every single thing imaginable without hassle!
July 19, 2023 at 2:19 AM
feat: support global ape-config.yaml files

This one is really cool

Before this update: Only per-project config files

After this update: Global + per-user config files!
July 19, 2023 at 2:19 AM
feat: extra settings for dependencies

You can now use compiler settings config for dependencies!

A small feature, but great feature for handling those annoying PUSH0-related issues
July 19, 2023 at 2:19 AM
feat: EIP-5202 blueprint support with API method

Here's the head Ape explaining why this one is so cool

https://twitter.com/fubuloubu/status/1677436148522549254
July 19, 2023 at 2:19 AM
feat: ability to see constructor transaction traces and gas

With this you'll be able to see traces for contract deployments waaaay better
July 19, 2023 at 2:18 AM
Basically, it saves you 30 gas for free! No questions asked

But also it allows Ape to detect this subtle varient of ERC-1167 proxies and what the real interface is for the code, since the proxy just forwards to it's implementation
July 19, 2023 at 2:18 AM
feat: detect solady push0 minimal proxies

This is a really cool one made by the Yearn bunnylord himself,
@bantg

It's special type of proxy that was made from ERC-1167 proxies with the new PUSH0 opcode, which was only added recently
July 19, 2023 at 2:18 AM
feat: ape pm compile for all dependencies and prevent failing on first dependency during compile

And the brother of the PRs. When you compile dependencies they now happen in parallel vs series so you get a clear view of all the errors

Dependency management has never been easier
July 19, 2023 at 2:18 AM
feat: --include-dependencies flag for ape compile command and setting

This is the sister PR to the previous one. You can now force recompile your dependencies alongside customising them!
July 19, 2023 at 2:17 AM
feat: ape pm CLI commands

Work, alter, and compile dependencies separately from your own project + install whatever you like thats not listed in your Ape config!

Add customisation to your customisation to your customisation!
July 19, 2023 at 2:17 AM
feat: coverage

Alright so this one is so big we're devoting a whole blog to it, so stay tuned! We'll go into depth about everything coverage and how Ape makes it easier than ever!
July 19, 2023 at 2:17 AM
Thank you to everyone who joined and asked questions! If you want to catch the next AMA, feel free to join our Discord!

https://discord.com/invite/apeworx
July 7, 2023 at 11:43 PM