Sebastián Claudio Nale
a2bca1782c
Optimize `appendDeliveryInstruction`.
...
This simplification allows the compiler to emit less code.
2023-02-21 12:56:07 -03:00
Sebastián Claudio Nale
44cd7ee49b
Set `viaIR` flag in foundry.toml
2023-02-21 12:56:07 -03:00
Sebastián Claudio Nale
958d964ad5
Avoid call if the value sent is zero.
2023-02-21 12:56:07 -03:00
Sebastián Claudio Nale
a5427bb177
Make refund and reward addresses `payable`.
2023-02-21 12:56:07 -03:00
Sebastián Claudio Nale
9acc9fcbd6
Cleans up `validateRedeliverySingle`.
2023-02-21 12:56:07 -03:00
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