Skip to content

Commit

Permalink
Merge pull request #9 from catalystdao/review-implementation
Browse files Browse the repository at this point in the history
Rename various elements of the contract to better convey their usage.
  • Loading branch information
reednaa authored Nov 10, 2023
2 parents 598f118 + 0425b41 commit c1a525b
Show file tree
Hide file tree
Showing 41 changed files with 339 additions and 281 deletions.
90 changes: 46 additions & 44 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,43 +1,29 @@
AckReentryTest:test_reentry_on_ack_message() (gas: 531465)
CallReentryTest:test_reentry_on_call_message() (gas: 560516)
EscrowInformationTest:test_check_escrow_events() (gas: 100189)
EscrowInformationTest:test_check_escrow_state() (gas: 97583)
EscrowInformationTest:test_gas_refund(uint256) (runs: 256, μ: 148866, ~: 153744)
EscrowWrongGasPaymentTest:test_fail_not_enough_gas_sent() (gas: 94126)
EscrowWrongGasPaymentTest:test_place_incentive() (gas: 90028)
GasSpendControlTest:test_fail_relayer_has_to_provide_enough_gas() (gas: 605769)
GasSpendControlTest:test_process_ack_gas() (gas: 621372)
GasSpendControlTest:test_process_delivery_gas() (gas: 361159)
IncreaseBountyTest:test_fail_bounty_does_not_exist() (gas: 18092)
IncreaseBountyTest:test_fail_overpay() (gas: 128551)
IncreaseBountyTest:test_fail_under_and_overpay(int256) (runs: 256, μ: 130637, ~: 130637)
IncreaseBountyTest:test_increase_escrow() (gas: 130317)
IncreaseBountyTest:test_no_increase_escrow() (gas: 123046)
MessageIdentifierTest:test_destination_identifier_impacts_message_identifier() (gas: 301697)
MessageIdentifierTest:test_non_unique_bounty(bytes) (runs: 256, μ: 105179, ~: 105073)
MessageIdentifierTest:test_unique_identifier_block_10() (gas: 97356)
MessageIdentifierTest:test_unique_identifier_block_11() (gas: 97312)
NoImplementationAddressSetTest:test_error_no_implementation_address_set() (gas: 343809)
OnRecvAckTest:test_on_ack() (gas: 231489)
OnRecvCallTest:test_on_call() (gas: 163544)
OnRecvRecoverAckTest:test_recover_ack() (gas: 248414)
OnRecvTimeoutTest:test_on_timeout() (gas: 122932)
ProcessMessageAckTest:test_ack_called_event() (gas: 219055)
ProcessMessageAckTest:test_ack_different_recipitents() (gas: 253701)
ProcessMessageAckTest:test_ack_less_time_than_expected(uint64,uint64) (runs: 256, μ: 256507, ~: 258584)
ProcessMessageAckTest:test_ack_more_time_than_expected(uint64,uint64) (runs: 256, μ: 259380, ~: 259380)
ProcessMessageAckTest:test_ack_process_message() (gas: 214262)
ProcessMessageCallTest:test_call_process_message() (gas: 177645)
ProcessMessageCallTest:test_call_process_message_twice() (gas: 173179)
ProcessMessageCallTest:test_expect_caller(address) (runs: 256, μ: 228410, ~: 228410)
ProcessMessageNoReceiveTest:test_application_does_not_implement_interface() (gas: 174683)
ReturnBombTest:test_process_ack_gas() (gas: 5338932)
SendMessagePaymentTest:test_error_send_message_without_additional_cost() (gas: 110120)
SendMessagePaymentTest:test_estimate_cost() (gas: 8086)
SendMessagePaymentTest:test_process_message_with_additional_payment(bytes) (runs: 256, μ: 175499, ~: 175285)
SendMessagePaymentTest:test_process_message_without_additional_payment(bytes) (runs: 256, μ: 176059, ~: 175845)
SendMessagePaymentTest:test_send_message_with_additional_cost() (gas: 102845)
TargetDeltaZeroTest:test_target_delta_zero(uint16) (runs: 256, μ: 257183, ~: 257183)
AckReentryTest:test_reentry_on_ack_message() (gas: 531773)
CallReentryTest:test_reentry_on_call_message() (gas: 560904)
EscrowInformationTest:test_check_escrow_events() (gas: 100336)
EscrowInformationTest:test_check_escrow_state() (gas: 97727)
EscrowInformationTest:test_gas_refund(uint256) (runs: 256, μ: 149013, ~: 153891)
EscrowWrongGasPaymentTest:test_fail_not_enough_gas_sent() (gas: 94273)
EscrowWrongGasPaymentTest:test_place_incentive() (gas: 90175)
GasSpendControlTest:test_fail_relayer_has_to_provide_enough_gas() (gas: 606085)
GasSpendControlTest:test_process_ack_gas() (gas: 621789)
GasSpendControlTest:test_process_delivery_gas() (gas: 361408)
IncreaseBountyTest:test_fail_bounty_does_not_exist() (gas: 18067)
IncreaseBountyTest:test_fail_overpay() (gas: 128710)
IncreaseBountyTest:test_fail_under_and_overpay(int256) (runs: 256, μ: 130796, ~: 130796)
IncreaseBountyTest:test_increase_escrow() (gas: 130476)
IncreaseBountyTest:test_no_increase_escrow() (gas: 123205)
MessageIdentifierTest:test_destination_identifier_impacts_message_identifier() (gas: 302723)
MessageIdentifierTest:test_non_unique_bounty(bytes) (runs: 256, μ: 105473, ~: 105367)
MessageIdentifierTest:test_unique_identifier_block_10() (gas: 97503)
MessageIdentifierTest:test_unique_identifier_block_11() (gas: 97459)
NoImplementationAddressSetTest:test_error_no_implementation_address_set() (gas: 343984)
OnRecvAckTest:test_on_ack() (gas: 231293)
OnRecvCallTest:test_on_call() (gas: 163342)
OnRecvRecoverAckTest:test_recover_ack() (gas: 248194)
OnRecvTimeoutTest:test_on_timeout() (gas: 122875)
ReturnBombTest:test_process_ack_gas() (gas: 5339423)
TargetDeltaZeroTest:test_target_delta_zero(uint16) (runs: 256, μ: 257572, ~: 257572)
TestMessages:testCannotVerifySignaturesWithInvalidSignature(bytes) (runs: 256, μ: 28353, ~: 28345)
TestMessages:testCannotVerifySignaturesWithOutOfBoundsSignature(bytes) (runs: 256, μ: 29972, ~: 29964)
TestMessages:testHashMismatchedVMIsNotVerified() (gas: 92458)
Expand All @@ -48,7 +34,23 @@ TestMessagesC2Sigs:test_compare_wormhole_implementation_and_calldata_version() (
TestMessagesC2Sigs:test_error_invalid_vm() (gas: 135944)
TestMessagesC:test_compare_wormhole_implementation_and_calldata_version() (gas: 105270)
TestMessagesC:test_error_invalid_vm() (gas: 103798)
TestProcessMessageDisabled:test_process_message_disabled(bytes,bytes,address) (runs: 256, μ: 10140, ~: 10117)
TestRoundtrip:test_escrow_wormhole_message(bytes) (runs: 256, μ: 264468, ~: 263957)
TimeOverflowTest:test_larger_than_uint_time_is_fine() (gas: 253419)
TimeOverflowTest:test_overflow_in_unchecked_is_fine() (gas: 255631)
TestRoundtrip:test_escrow_wormhole_message(bytes) (runs: 256, μ: 265095, ~: 264584)
TestSetRemoteImplementation:test_set_remote_implementation(bytes32,bytes) (runs: 256, μ: 110311, ~: 96467)
TestSetRemoteImplementation:test_set_remote_implementation_twice(bytes32,bytes) (runs: 256, μ: 93461, ~: 83021)
TestprocessPacketDisabled:test_process_message_disabled(bytes,bytes,address) (runs: 256, μ: 10269, ~: 10249)
TimeOverflowTest:test_larger_than_uint_time_is_fine() (gas: 253835)
TimeOverflowTest:test_overflow_in_unchecked_is_fine() (gas: 256023)
processPacketAckTest:test_ack_called_event() (gas: 219447)
processPacketAckTest:test_ack_different_recipitents() (gas: 254120)
processPacketAckTest:test_ack_less_time_than_expected(uint64,uint64) (runs: 256, μ: 257109, ~: 258979)
processPacketAckTest:test_ack_more_time_than_expected(uint64,uint64) (runs: 256, μ: 259775, ~: 259775)
processPacketAckTest:test_ack_process_message() (gas: 214657)
processPacketCallTest:test_call_process_message() (gas: 177932)
processPacketCallTest:test_call_process_message_twice() (gas: 173570)
processPacketCallTest:test_expect_caller(address) (runs: 256, μ: 229026, ~: 229026)
processPacketNoReceiveTest:test_application_does_not_implement_interface() (gas: 174912)
sendPacketPaymentTest:test_error_send_message_without_additional_cost() (gas: 110264)
sendPacketPaymentTest:test_estimate_cost() (gas: 8101)
sendPacketPaymentTest:test_process_message_with_additional_payment(bytes) (runs: 256, μ: 175786, ~: 175572)
sendPacketPaymentTest:test_process_message_without_additional_payment(bytes) (runs: 256, μ: 176346, ~: 176132)
sendPacketPaymentTest:test_send_message_with_additional_cost() (gas: 102989)
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ libs = ["lib"]
via_ir = true
optimizer = true
optimizer_runs = 100_000
solc_version = "0.8.22"
evm_version = "paris"

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Loading

0 comments on commit c1a525b

Please sign in to comment.