Skip to content

Commit 423f837

Browse files
committed
delete some test code and fmt
1 parent b2d029a commit 423f837

10 files changed

+27
-663
lines changed

shared/contract-bindings/src/synd/gas_counter.rs

Lines changed: 1 addition & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Generated by the following Solidity interface...
44
```solidity
55
interface GasCounter {
6-
error GasStartLessThanGasLeft(uint256 gasStart, uint256 gasLeft);
76
error GasTrackingAlreadyDisabled();
87
error GasTrackingAlreadyEnabled();
98
error ZeroEpochIndex();
@@ -164,22 +163,6 @@ interface GasCounter {
164163
],
165164
"stateMutability": "view"
166165
},
167-
{
168-
"type": "error",
169-
"name": "GasStartLessThanGasLeft",
170-
"inputs": [
171-
{
172-
"name": "gasStart",
173-
"type": "uint256",
174-
"internalType": "uint256"
175-
},
176-
{
177-
"name": "gasLeft",
178-
"type": "uint256",
179-
"internalType": "uint256"
180-
}
181-
]
182-
},
183166
{
184167
"type": "error",
185168
"name": "GasTrackingAlreadyDisabled",
@@ -229,100 +212,6 @@ pub mod GasCounter {
229212
);
230213
#[derive(serde::Serialize, serde::Deserialize)]
231214
#[derive(Default, Debug, PartialEq, Eq, Hash)]
232-
/**Custom error with signature `GasStartLessThanGasLeft(uint256,uint256)` and selector `0xff9d5d3d`.
233-
```solidity
234-
error GasStartLessThanGasLeft(uint256 gasStart, uint256 gasLeft);
235-
```*/
236-
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
237-
#[derive(Clone)]
238-
pub struct GasStartLessThanGasLeft {
239-
#[allow(missing_docs)]
240-
pub gasStart: alloy::sol_types::private::primitives::aliases::U256,
241-
#[allow(missing_docs)]
242-
pub gasLeft: alloy::sol_types::private::primitives::aliases::U256,
243-
}
244-
#[allow(
245-
non_camel_case_types,
246-
non_snake_case,
247-
clippy::pub_underscore_fields,
248-
clippy::style
249-
)]
250-
const _: () = {
251-
use alloy::sol_types as alloy_sol_types;
252-
#[doc(hidden)]
253-
type UnderlyingSolTuple<'a> = (
254-
alloy::sol_types::sol_data::Uint<256>,
255-
alloy::sol_types::sol_data::Uint<256>,
256-
);
257-
#[doc(hidden)]
258-
type UnderlyingRustTuple<'a> = (
259-
alloy::sol_types::private::primitives::aliases::U256,
260-
alloy::sol_types::private::primitives::aliases::U256,
261-
);
262-
#[cfg(test)]
263-
#[allow(dead_code, unreachable_patterns)]
264-
fn _type_assertion(
265-
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
266-
) {
267-
match _t {
268-
alloy_sol_types::private::AssertTypeEq::<
269-
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
270-
>(_) => {}
271-
}
272-
}
273-
#[automatically_derived]
274-
#[doc(hidden)]
275-
impl ::core::convert::From<GasStartLessThanGasLeft> for UnderlyingRustTuple<'_> {
276-
fn from(value: GasStartLessThanGasLeft) -> Self {
277-
(value.gasStart, value.gasLeft)
278-
}
279-
}
280-
#[automatically_derived]
281-
#[doc(hidden)]
282-
impl ::core::convert::From<UnderlyingRustTuple<'_>> for GasStartLessThanGasLeft {
283-
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
284-
Self {
285-
gasStart: tuple.0,
286-
gasLeft: tuple.1,
287-
}
288-
}
289-
}
290-
#[automatically_derived]
291-
impl alloy_sol_types::SolError for GasStartLessThanGasLeft {
292-
type Parameters<'a> = UnderlyingSolTuple<'a>;
293-
type Token<'a> = <Self::Parameters<
294-
'a,
295-
> as alloy_sol_types::SolType>::Token<'a>;
296-
const SIGNATURE: &'static str = "GasStartLessThanGasLeft(uint256,uint256)";
297-
const SELECTOR: [u8; 4] = [255u8, 157u8, 93u8, 61u8];
298-
#[inline]
299-
fn new<'a>(
300-
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
301-
) -> Self {
302-
tuple.into()
303-
}
304-
#[inline]
305-
fn tokenize(&self) -> Self::Token<'_> {
306-
(
307-
<alloy::sol_types::sol_data::Uint<
308-
256,
309-
> as alloy_sol_types::SolType>::tokenize(&self.gasStart),
310-
<alloy::sol_types::sol_data::Uint<
311-
256,
312-
> as alloy_sol_types::SolType>::tokenize(&self.gasLeft),
313-
)
314-
}
315-
#[inline]
316-
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
317-
<Self::Parameters<
318-
'_,
319-
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
320-
.map(Self::new)
321-
}
322-
}
323-
};
324-
#[derive(serde::Serialize, serde::Deserialize)]
325-
#[derive(Default, Debug, PartialEq, Eq, Hash)]
326215
/**Custom error with signature `GasTrackingAlreadyDisabled()` and selector `0xcd60c3ca`.
327216
```solidity
328217
error GasTrackingAlreadyDisabled();
@@ -2343,8 +2232,6 @@ function tokensUsedPerEpoch(uint256 epoch) external view returns (uint256);
23432232
#[derive(serde::Serialize, serde::Deserialize)]
23442233
#[derive(Debug, PartialEq, Eq, Hash)]
23452234
pub enum GasCounterErrors {
2346-
#[allow(missing_docs)]
2347-
GasStartLessThanGasLeft(GasStartLessThanGasLeft),
23482235
#[allow(missing_docs)]
23492236
GasTrackingAlreadyDisabled(GasTrackingAlreadyDisabled),
23502237
#[allow(missing_docs)]
@@ -2364,20 +2251,16 @@ function tokensUsedPerEpoch(uint256 epoch) external view returns (uint256);
23642251
[118u8, 121u8, 64u8, 13u8],
23652252
[205u8, 96u8, 195u8, 202u8],
23662253
[214u8, 147u8, 104u8, 212u8],
2367-
[255u8, 157u8, 93u8, 61u8],
23682254
];
23692255
}
23702256
#[automatically_derived]
23712257
impl alloy_sol_types::SolInterface for GasCounterErrors {
23722258
const NAME: &'static str = "GasCounterErrors";
23732259
const MIN_DATA_LENGTH: usize = 0usize;
2374-
const COUNT: usize = 4usize;
2260+
const COUNT: usize = 3usize;
23752261
#[inline]
23762262
fn selector(&self) -> [u8; 4] {
23772263
match self {
2378-
Self::GasStartLessThanGasLeft(_) => {
2379-
<GasStartLessThanGasLeft as alloy_sol_types::SolError>::SELECTOR
2380-
}
23812264
Self::GasTrackingAlreadyDisabled(_) => {
23822265
<GasTrackingAlreadyDisabled as alloy_sol_types::SolError>::SELECTOR
23832266
}
@@ -2439,17 +2322,6 @@ function tokensUsedPerEpoch(uint256 epoch) external view returns (uint256);
24392322
}
24402323
ZeroEpochIndex
24412324
},
2442-
{
2443-
fn GasStartLessThanGasLeft(
2444-
data: &[u8],
2445-
) -> alloy_sol_types::Result<GasCounterErrors> {
2446-
<GasStartLessThanGasLeft as alloy_sol_types::SolError>::abi_decode_raw(
2447-
data,
2448-
)
2449-
.map(GasCounterErrors::GasStartLessThanGasLeft)
2450-
}
2451-
GasStartLessThanGasLeft
2452-
},
24532325
];
24542326
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
24552327
return Err(
@@ -2503,17 +2375,6 @@ function tokensUsedPerEpoch(uint256 epoch) external view returns (uint256);
25032375
}
25042376
ZeroEpochIndex
25052377
},
2506-
{
2507-
fn GasStartLessThanGasLeft(
2508-
data: &[u8],
2509-
) -> alloy_sol_types::Result<GasCounterErrors> {
2510-
<GasStartLessThanGasLeft as alloy_sol_types::SolError>::abi_decode_raw_validate(
2511-
data,
2512-
)
2513-
.map(GasCounterErrors::GasStartLessThanGasLeft)
2514-
}
2515-
GasStartLessThanGasLeft
2516-
},
25172378
];
25182379
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
25192380
return Err(
@@ -2528,11 +2389,6 @@ function tokensUsedPerEpoch(uint256 epoch) external view returns (uint256);
25282389
#[inline]
25292390
fn abi_encoded_size(&self) -> usize {
25302391
match self {
2531-
Self::GasStartLessThanGasLeft(inner) => {
2532-
<GasStartLessThanGasLeft as alloy_sol_types::SolError>::abi_encoded_size(
2533-
inner,
2534-
)
2535-
}
25362392
Self::GasTrackingAlreadyDisabled(inner) => {
25372393
<GasTrackingAlreadyDisabled as alloy_sol_types::SolError>::abi_encoded_size(
25382394
inner,
@@ -2553,12 +2409,6 @@ function tokensUsedPerEpoch(uint256 epoch) external view returns (uint256);
25532409
#[inline]
25542410
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
25552411
match self {
2556-
Self::GasStartLessThanGasLeft(inner) => {
2557-
<GasStartLessThanGasLeft as alloy_sol_types::SolError>::abi_encode_raw(
2558-
inner,
2559-
out,
2560-
)
2561-
}
25622412
Self::GasTrackingAlreadyDisabled(inner) => {
25632413
<GasTrackingAlreadyDisabled as alloy_sol_types::SolError>::abi_encode_raw(
25642414
inner,

0 commit comments

Comments
 (0)