If you don't do this, in the tests you have to do:
vm.expectRevert(bytes4(keccak256("UnsupportedQueryType()")));
Whereas with this change, you can simply import the contract and do:
vm.expectRevert(UnsupportedQueryType.selector);
Instead of the test contract inheriting directly from the QueryResponse
contract, it instantiates an instance of it and uses that for the
testing. This seems to work much nicer with the forge coverage tools.
With this commit, the coverage for QueryResponse shows 85.1% line
coverage, 100% function coverage, and 50% branch coverage.
By moving the structs out of the abstract contract, you can use them
directly in any contract that imports QueryResponse.sol *without*
requiring that contract to inherit from the QueryResponse contract. This
seems to work much better with forge's coverage tooling.
* refund address handling improvement
* fix compilation error
* Remove unnecessary line
* restrict to view
* fix comment
* Improve handling of gas limits
* get test to pass - check that the return data is appropriately long before decoding
* modification to checking inequality
* modification to checking inequality - use unchecked
* clean functions around - add untrustedBaseDeliveryPrice
* make quote_length_bytes a constant
* seperate pay into two overloads
* change inequality to equality for checking return data length
* renaming functions
* allow override of refund per gas unused
* test modification
* note
* update clients.js version
* updates to clients/js
* update clients/js
* Generate modification
* prettier
* status change
* docs change
* add back the 'impossible's
* update sdk version
* better status check WIP
* WIP
* Improved status check and stringify function with times
* improvements to status printing
* prettier format
* Remove last console log
* prettier
* readme modify
* readme fix
* Readme fix
* readme changes
* don't rely on wormscan for status in devnet
* prettier
* Remove status check from integration testing - this is a helper that shouldn't interfere with contract testing
* prettier
* update clients.js version
* readme revert changes
* base default rpcs
* script improvements
* Add manual delivery helper
* remove console logs
* arbitrum needs a custom block range
* fix bug in testing if blocknumber is 0
* deliver fixes for manual delivery
* prettier
* fix default block tag
* pre-pend scripts with test
* review comments
* CCQ: Query Server
* More rework
* Clean up p2p code
* Health check change
* node: support http PUT or POST for new ccq queries
---------
Co-authored-by: Jeff Schroeder <jeffschroeder@computer.org>
* aptos: update upgrade script to support mainnet
Also factor out named_addresses into a separate helper script
* scripts: aptos support for gov proposal generation
* sdk/js: add aptos nft_bridge mainnet address