Skip to content

Commit

Permalink
Chores in opensea_sudo_arb strategy (#21)
Browse files Browse the repository at this point in the history
* Add gas snapshot

* Minor strategy README fixes

* Update seaport to a constant

* Natspec typo fix

* Cover unprofitable arb scenario

* Use custom error instead of revert string

* Binding updates
  • Loading branch information
0xmichalis authored Jun 7, 2023
1 parent 5311f4b commit 88b664b
Show file tree
Hide file tree
Showing 43 changed files with 2,758 additions and 2,576 deletions.
4 changes: 4 additions & 0 deletions crates/strategies/opensea-sudo-arb/.gas-snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SudoOpenseaArbTest:testArb() (gas: 479364)
SudoOpenseaArbTest:testUnprofitableArb() (gas: 479798)
SudoPairQuoterTest:testCorrectSingleQuote() (gas: 38910)
SudoPairQuoterTest:testCorrectnessMultiQuote() (gas: 50341)
4 changes: 2 additions & 2 deletions crates/strategies/opensea-sudo-arb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This strategy relies on two contracts:
In order to run the solidity test, you need access to an alchemy/infura key. You can run tests with the following command:

```sh
ETH_MAINNET_HTTP=<YOUR_KEY> forge test --root ./contracts
ETH_MAINNET_HTTP=<YOUR_RPC_URL> forge test --root ./contracts
```

You can run the rust tests with the following command:
Expand All @@ -44,5 +44,5 @@ cargo test
And if you need to regenerate rust bindings for contracts, you can run

```sh
forge bind --bindings-path ./bindings --root ./contracts --crate-name bindings
forge bind --bindings-path ./bindings --root ./contracts --crate-name bindings --overwrite
```
116 changes: 58 additions & 58 deletions crates/strategies/opensea-sudo-arb/bindings/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,38 +115,38 @@ pub mod address {
34,
18,
32,
202,
152,
70,
239,
211,
52,
127,
9,
33,
119,
255,
244,
226,
10,
14,
123,
138,
128,
5,
7,
198,
216,
163,
130,
181,
77,
26,
189,
127,
76,
226,
135,
19,
221,
115,
120,
213,
229,
82,
240,
142,
21,
220,
79,
90,
195,
140,
238,
30,
26,
244,
152,
187,
53,
136,
86,
36,
124,
55,
205,
100,
115,
111,
Expand All @@ -155,7 +155,7 @@ pub mod address {
67,
0,
8,
17,
19,
0,
51,
];
Expand Down Expand Up @@ -208,38 +208,38 @@ pub mod address {
34,
18,
32,
202,
152,
70,
239,
211,
52,
127,
9,
33,
119,
255,
244,
226,
10,
14,
123,
138,
128,
5,
7,
198,
216,
163,
130,
181,
77,
26,
189,
127,
76,
226,
135,
19,
221,
115,
120,
213,
229,
82,
240,
142,
21,
220,
79,
90,
195,
140,
238,
30,
26,
244,
152,
187,
53,
136,
86,
36,
124,
55,
205,
100,
115,
111,
Expand All @@ -248,7 +248,7 @@ pub mod address {
67,
0,
8,
17,
19,
0,
51,
];
Expand Down
120 changes: 60 additions & 60 deletions crates/strategies/opensea-sudo-arb/bindings/src/amount_deriver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,38 +66,38 @@ pub mod amount_deriver {
34,
18,
32,
54,
211,
8,
145,
38,
142,
160,
101,
90,
161,
15,
211,
59,
19,
224,
95,
197,
195,
173,
147,
158,
247,
70,
131,
169,
154,
72,
36,
133,
107,
64,
158,
38,
66,
182,
11,
52,
180,
222,
243,
217,
199,
53,
180,
208,
45,
171,
25,
14,
132,
251,
197,
247,
227,
169,
0,
124,
64,
252,
71,
160,
100,
115,
111,
Expand All @@ -106,7 +106,7 @@ pub mod amount_deriver {
67,
0,
8,
17,
19,
0,
51,
];
Expand Down Expand Up @@ -136,38 +136,38 @@ pub mod amount_deriver {
34,
18,
32,
54,
211,
8,
145,
38,
142,
160,
101,
90,
161,
15,
211,
59,
19,
224,
95,
197,
195,
173,
147,
158,
247,
70,
131,
169,
154,
72,
36,
133,
107,
64,
158,
38,
66,
182,
11,
52,
180,
222,
243,
217,
199,
53,
180,
208,
45,
171,
25,
14,
132,
251,
197,
247,
227,
169,
0,
124,
64,
252,
71,
160,
100,
115,
111,
Expand All @@ -176,7 +176,7 @@ pub mod amount_deriver {
67,
0,
8,
17,
19,
0,
51,
];
Expand Down
Loading

0 comments on commit 88b664b

Please sign in to comment.