Commit Graph

256 Commits

Author SHA1 Message Date
derpy-duck d814cd99a3 Remove files in ethereum/ 2023-02-21 10:44:16 -05:00
derpy-duck 56a9fb502a Remove unnecessary files and folders 2023-02-21 10:44:16 -05:00
Sebastián Claudio Nale 01da291299 Fix forge test build. 2023-02-21 12:43:33 -03:00
derpy-duck 585626c1fc Make the '600000' hardcode safer 2023-02-21 12:43:33 -03:00
derpy-duck 447db2cd00 forge test fix 2023-02-21 12:43:33 -03:00
Sebastián Claudio Nale 1003717cdb Adds `receive()` function in `MockRelayerIntegration`. 2023-02-21 12:43:33 -03:00
derpy-duck b0e1378957 Forge tests pass; Fixed the 'string' for the InvalidRedeliveryVM error, which changed in the replacement of wormhole with MockWormhole 2023-02-21 12:43:33 -03:00
Sebastián Claudio Nale 3f713d7efc Adds `MockWormhole` contract for unit tests.
Also adds a `WormholeSimulator` interface for signing and non-signing
mocks. The signing mock can be useful when writing a test for a
specific testnet fork with a real wormhole deployment. In the unit tests,
only the non signing mock is used.
2023-02-21 12:43:33 -03:00
derpy-duck 45021b4691 forge fmt 2023-02-21 10:43:13 -05:00
derpy-duck a7bda1a057 Nice specs for IWormholeRelayer 2023-02-21 10:43:13 -05:00
Sebastián Claudio Nale 1cae1ba324 Fixes relayer reward to take into account forward publish fee. 2023-02-17 19:57:28 -03:00
Sebastián Claudio Nale 3795b4ee1c Fixes struct parsing in sdk. 2023-02-17 19:54:52 -03:00
Sebastián Claudio Nale 0b10f9e2a5 Puts enum type in the `Delivery` event. 2023-02-17 19:54:26 -03:00
Sebastián Claudio Nale f7174f2084 Adds named parameters to `Delivery` events. 2023-02-17 19:54:26 -03:00
Sebastián Claudio Nale eced885877 `forge fmt` run. 2023-02-17 19:54:26 -03:00
Sebastián Claudio Nale a41490cc38 Uses `abi.encodeCall` to typecheck some encoded calls. 2023-02-17 19:54:26 -03:00
Sebastián Claudio Nale f9662f12c8 Uses named parameters in the creation of several structs in unit tests. 2023-02-17 19:54:26 -03:00
derpy-duck 047fdb1abc
Dont relay not sufficiently funded (#95)
* Add fix to relayer engine not relaying not sufficiently funded messages. But Incomplete test; how to eventually relay these!

* comment out part of test that doesn't work

* Log info that the delivery instruction is not sufficiently funded
2023-02-17 15:05:42 -05:00
derpy-duck d335a35abd redelivery test passing 2023-02-14 14:08:21 -05:00
derpy-duck 01350a5da1 Fix multiforward test 2023-02-14 14:08:21 -05:00
derpy-duck 30c8d162e3 changes to get typescript test to work 2023-02-14 14:08:21 -05:00
derpy-duck 785ba82080 Revert "Adds `memory-safe` tag to assembly sections in `BytesLib`."
This reverts commit 2cbbf25d74.
2023-02-14 14:08:21 -05:00
derpy-duck b803184a8d forge fmt 2023-02-14 14:08:21 -05:00
derpy-duck 46d276e37e Rebase completed! 2023-02-14 14:08:21 -05:00
derpy-duck f0c610c237 multifoward test 2023-02-14 14:08:21 -05:00
derpy-duck 8ebd9ca255 easier implementation of parsing deliveryinstructioncontainer 2023-02-14 14:08:21 -05:00
derpy-duck f5c1fe3a7b Multidelivery, forwarding tests work + Relayer engine fix! 2023-02-14 14:08:21 -05:00
derpy-duck 249145af86 Forwarding test passes! 2023-02-14 14:08:21 -05:00
derpy-duck 1401c88038 forge fmt 2023-02-14 14:08:21 -05:00
derpy-duck ae5e23cd67 Fix typescript types pt 2 2023-02-14 14:08:21 -05:00
derpy-duck 7d9012660e Remove overload in MockRelayerIntegration 2023-02-14 14:08:21 -05:00
derpy-duck 69b476646d fix typescript errors pt 1 2023-02-14 14:08:21 -05:00
derpy-duck d157e1fe0f New MockRelayerIntegration contract, and modified forge tests to still pass! (literal hours of debugging :'( ) 2023-02-14 14:08:21 -05:00
scnale 0f7c0a0c69 Negative test for a reentrant attack on the core relayer forward mechanism (#83)
* Modifies the relayer simulation to be easier to use in negative tests.

* Adds negative test for a reentrancy attack on the forward mechanism.

* `forge fmt` run.
2023-02-14 14:08:21 -05:00
Sebastián Claudio Nale ca71dcbfee Filter EVM logs in unit tests to just wormhole publish message logs. 2023-02-14 14:08:21 -05:00
Sebastián Claudio Nale 302a0e07fe Adds `memory-safe` tag to assembly sections in `BytesLib`.
This improves codegen in the compiler and reduces the chance of
untraceable internal codegen errors when dealing with stack variables
that can't be referenced with an instruction.
2023-02-14 14:08:21 -05:00
derpy-duck 991e88eac2 Bugfixes 2023-02-14 14:08:21 -05:00
derpy-duck 0998f557da Remove duplicate test 2023-02-14 14:08:21 -05:00
derpy-duck 4e05c4a007 work in progress for editing mockrelayintegration 2023-02-14 14:08:21 -05:00
derpy-duck 59f1f4439f Real integration test :) 2023-02-14 14:08:21 -05:00
Joe Howarth dee6ba7081 improve message test 2023-02-14 14:08:21 -05:00
Joe Howarth 09ba7ea340 undo fmt 2023-02-14 14:08:21 -05:00
Joe Howarth 9bfee08792 update ts-test 2023-02-14 14:08:21 -05:00
derpy-duck 0e9a3ad98e Fix some bugs in 2_core_relayer 2023-02-14 14:08:21 -05:00
derpy-duck df7a065d7f Use sendMessage of mockRelayerIntegration 2023-02-14 14:08:21 -05:00
derpy-duck 7ec66047b3 typescript test 2023-02-14 14:08:21 -05:00
derpy-duck 58f34e0805 First relayprovider typescript test 2023-02-14 14:08:21 -05:00
derpy-duck 840f18b931 Nonce is a uint32, not a uint256 2023-02-14 14:05:58 -05:00
derpy-duck d434221240
Install with forge not npm (#84)
* forge install: openzeppelin-contracts

v4.8.1

* Using openzeppelin from forge, not npm

* Keep original import

* Remove undesired changes

* add back a @

* makefile changes

* makefile changes

* Remove .gitmodules

* Remove submodule

* remove defaultSettings

* removed submodule openzeppelin

* original package-lock

* uninstall @openzeppelin

* remove truffle-config + two outdated READMEs

* Trying to remove solc

* Revert "Trying to remove solc"

This reverts commit 4debc9d127.

* Trying to remove solc
2023-02-14 10:42:04 -05:00
derpy-duck ba8a09d6f7
save target address in state and use it to verify forwarding request (#75)
* save target address in state and use it to verify forwarding request

* Fix to Multideliveries/Multiforwards

* complete merge
2023-02-14 10:33:55 -05:00