feat: add and use a user operation trait #179
Annotations
26 errors and 1 warning
the method `gather_context_violations` exists for struct `Simulator<MockProvider, MockEntryPoint, MockSimulateValidationTracer>`, but its trait bounds were not satisfied:
crates/sim/src/simulation/v0_6/simulator.rs#L906
error[E0599]: the method `gather_context_violations` exists for struct `Simulator<MockProvider, MockEntryPoint, MockSimulateValidationTracer>`, but its trait bounds were not satisfied
--> crates/sim/src/simulation/v0_6/simulator.rs:906:29
|
60 | pub struct Simulator<P: Provider, E: EntryPoint, T: SimulateValidationTracer> {
| ----------------------------------------------------------------------------- method `gather_context_violations` not found for this struct
...
906 | let res = simulator.gather_context_violations(&mut validation_context);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
|
::: /home/runner/work/rundler/rundler/crates/provider/src/traits/entry_point.rs:63:36
|
63 | #[cfg_attr(feature = "test-utils", automock(type UO = rundler_types::UserOperationVariant;))]
| -------------------------------------------------------- doesn't satisfy `<_ as EntryPoint>::UO = UserOperation`
|
= note: the full type name has been written to '/home/runner/work/rundler/rundler/target/debug/deps/rundler_sim-434bc66623ced804.long-type-13042168542223683990.txt'
note: trait bound `<rundler_provider::MockEntryPoint as rundler_provider::EntryPoint>::UO = rundler_types::v0_6::UserOperation` was not satisfied
--> crates/sim/src/simulation/v0_6/simulator.rs:72:19
|
69 | impl<P, E, T> Simulator<P, E, T>
| ------------------
...
72 | E: EntryPoint<UO = UserOperation>,
| ^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here
|
the method `create_context` exists for struct `Simulator<MockProvider, MockEntryPoint, MockSimulateValidationTracer>`, but its trait bounds were not satisfied:
crates/sim/src/simulation/v0_6/simulator.rs#L807
error[E0599]: the method `create_context` exists for struct `Simulator<MockProvider, MockEntryPoint, MockSimulateValidationTracer>`, but its trait bounds were not satisfied
--> crates/sim/src/simulation/v0_6/simulator.rs:807:14
|
60 | pub struct Simulator<P: Provider, E: EntryPoint, T: SimulateValidationTracer> {
| ----------------------------------------------------------------------------- method `create_context` not found for this struct
...
806 | let res = simulator
| ___________________-
807 | | .create_context(user_operation, BlockId::Number(BlockNumber::Latest))
| | -^^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
| |_____________|
|
|
::: /home/runner/work/rundler/rundler/crates/provider/src/traits/entry_point.rs:63:36
|
63 | #[cfg_attr(feature = "test-utils", automock(type UO = rundler_types::UserOperationVariant;))]
| -------------------------------------------------------- doesn't satisfy `<_ as EntryPoint>::UO = UserOperation`
|
= note: the full type name has been written to '/home/runner/work/rundler/rundler/target/debug/deps/rundler_sim-434bc66623ced804.long-type-13042168542223683990.txt'
note: trait bound `<rundler_provider::MockEntryPoint as rundler_provider::EntryPoint>::UO = rundler_types::v0_6::UserOperation` was not satisfied
--> crates/sim/src/simulation/v0_6/simulator.rs:72:19
|
69 | impl<P, E, T> Simulator<P, E, T>
| ------------------
...
72 | E: EntryPoint<UO = UserOperation>,
| ^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here
|
no method named `simulate_validation` found for struct `Simulator` in the current scope:
crates/sim/src/simulation/v0_6/simulator.rs#L768
error[E0599]: no method named `simulate_validation` found for struct `Simulator` in the current scope
--> crates/sim/src/simulation/v0_6/simulator.rs:768:14
|
60 | pub struct Simulator<P: Provider, E: EntryPoint, T: SimulateValidationTracer> {
| ----------------------------------------------------------------------------- method `simulate_validation` not found for this struct
...
767 | let res = simulator
| ___________________-
768 | | .simulate_validation(user_operation, None, None)
| | -^^^^^^^^^^^^^^^^^^^ method not found in `Simulator<MockProvider, MockEntryPoint, MockSimulateValidationTracer>`
| |_____________|
|
|
= note: the full type name has been written to '/home/runner/work/rundler/rundler/target/debug/deps/rundler_sim-434bc66623ced804.long-type-13042168542223683990.txt'
= help: items from traits can only be used if the trait is implemented and in scope
note: `simulation::Simulator` defines an item `simulate_validation`, perhaps you need to implement it
--> crates/sim/src/simulation/mod.rs:103:1
|
103 | pub trait Simulator: Send + Sync + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type mismatch resolving `<MockEntryPoint as EntryPoint>::UO == UserOperation`:
crates/sim/src/simulation/v0_6/simulator.rs#L706
error[E0271]: type mismatch resolving `<MockEntryPoint as EntryPoint>::UO == UserOperation`
--> crates/sim/src/simulation/v0_6/simulator.rs:706:17
|
704 | Simulator::new(
| -------------- required by a bound introduced by this call
705 | Arc::clone(&provider),
706 | Arc::new(entry_point),
| ^^^^^^^^^^^^^^^^^^^^^ expected `UserOperation`, found `UserOperationVariant`
|
note: required by a bound in `simulation::v0_6::simulator::Simulator::<P, E, T>::new`
--> crates/sim/src/simulation/v0_6/simulator.rs:72:19
|
72 | E: EntryPoint<UO = UserOperation>,
| ^^^^^^^^^^^^^^^^^^ required by this bound in `Simulator::<P, E, T>::new`
...
80 | pub fn new(
| --- required by a bound in this associated function
|
no associated item named `V0_6` found for trait `rundler_types::UserOperation`:
crates/sim/src/precheck.rs#L665
error[E0599]: no associated item named `V0_6` found for trait `rundler_types::UserOperation`
--> crates/sim/src/precheck.rs:665:33
|
665 | let op = UserOperation::V0_6(v0_6::UserOperation {
| ^^^^ associated item not found in `UserOperation`
|
no associated item named `V0_6` found for trait `rundler_types::UserOperation`:
crates/sim/src/precheck.rs#L627
error[E0599]: no associated item named `V0_6` found for trait `rundler_types::UserOperation`
--> crates/sim/src/precheck.rs:627:33
|
627 | let op = UserOperation::V0_6(v0_6::UserOperation {
| ^^^^ associated item not found in `UserOperation`
|
no associated item named `V0_6` found for trait `rundler_types::UserOperation`:
crates/sim/src/precheck.rs#L595
error[E0599]: no associated item named `V0_6` found for trait `rundler_types::UserOperation`
--> crates/sim/src/precheck.rs:595:33
|
595 | let op = UserOperation::V0_6(v0_6::UserOperation {
| ^^^^ associated item not found in `UserOperation`
|
no associated item named `V0_6` found for trait `rundler_types::UserOperation`:
crates/sim/src/precheck.rs#L551
error[E0599]: no associated item named `V0_6` found for trait `rundler_types::UserOperation`
--> crates/sim/src/precheck.rs:551:33
|
551 | let op = UserOperation::V0_6(v0_6::UserOperation {
| ^^^^ associated item not found in `UserOperation`
|
no associated item named `V0_6` found for trait `rundler_types::UserOperation`:
crates/sim/src/precheck.rs#L513
error[E0599]: no associated item named `V0_6` found for trait `rundler_types::UserOperation`
--> crates/sim/src/precheck.rs:513:33
|
513 | let op = UserOperation::V0_6(v0_6::UserOperation {
| ^^^^ associated item not found in `UserOperation`
|
no associated item named `V0_6` found for trait `rundler_types::UserOperation`:
crates/sim/src/precheck.rs#L478
error[E0599]: no associated item named `V0_6` found for trait `rundler_types::UserOperation`
--> crates/sim/src/precheck.rs:478:33
|
478 | let op = UserOperation::V0_6(v0_6::UserOperation {
| ^^^^ associated item not found in `UserOperation`
|
failed to resolve: use of undeclared type `GasEstimatorV0_6`:
crates/sim/src/estimation/v0_6/estimator.rs#L1285
error[E0433]: failed to resolve: use of undeclared type `GasEstimatorV0_6`
--> crates/sim/src/estimation/v0_6/estimator.rs:1285:73
|
1285 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^
| |
| use of undeclared type `GasEstimatorV0_6`
| help: a struct with a similar name exists: `GasEstimator`
|
no method named `total_verification_gas_limit` found for enum `rundler_types::UserOperationVariant` in the current scope:
crates/sim/src/estimation/v0_6/estimator.rs#L1140
error[E0599]: no method named `total_verification_gas_limit` found for enum `rundler_types::UserOperationVariant` in the current scope
--> crates/sim/src/estimation/v0_6/estimator.rs:1140:23
|
1140 | if op.total_verification_gas_limit() < gas_usage {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `UserOperationVariant`
|
::: /home/runner/work/rundler/rundler/crates/types/src/user_operation/mod.rs:84:8
|
84 | fn total_verification_gas_limit(&self) -> U256;
| ---------------------------- the method is available for `rundler_types::UserOperationVariant` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
439 + use rundler_types::UserOperation;
|
|
no method named `total_verification_gas_limit` found for enum `rundler_types::UserOperationVariant` in the current scope:
crates/sim/src/estimation/v0_6/estimator.rs#L718
error[E0599]: no method named `total_verification_gas_limit` found for enum `rundler_types::UserOperationVariant` in the current scope
--> crates/sim/src/estimation/v0_6/estimator.rs:718:23
|
718 | if op.total_verification_gas_limit() < gas_usage {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `UserOperationVariant`
|
::: /home/runner/work/rundler/rundler/crates/types/src/user_operation/mod.rs:84:8
|
84 | fn total_verification_gas_limit(&self) -> U256;
| ---------------------------- the method is available for `rundler_types::UserOperationVariant` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
439 + use rundler_types::UserOperation;
|
|
this method takes 2 arguments but 1 argument was supplied:
crates/sim/src/estimation/v0_6/estimator.rs#L675
error[E0061]: this method takes 2 arguments but 1 argument was supplied
--> crates/sim/src/estimation/v0_6/estimator.rs:675:27
|
675 | let u_o = user_op.max_fill(&settings);
| ^^^^^^^^-----------
| ||
| |expected `U256`, found `&Settings`
| an argument of type `ethers::types::U256` is missing
|
note: method defined here
--> /home/runner/work/rundler/rundler/crates/types/src/user_operation/v0_6.rs:228:12
|
228 | pub fn max_fill(&self, max_call_gas: U256, max_verification_gas: U256) -> UserOperation {
| ^^^^^^^^
help: provide the argument
|
675 | let u_o = user_op.max_fill(/* ethers::types::U256 */, /* ethers::types::U256 */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
failed to resolve: use of undeclared type `GasEstimatorV0_6`:
crates/sim/src/estimation/v0_6/estimator.rs#L661
error[E0433]: failed to resolve: use of undeclared type `GasEstimatorV0_6`
--> crates/sim/src/estimation/v0_6/estimator.rs:661:73
|
661 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^
| |
| use of undeclared type `GasEstimatorV0_6`
| help: a struct with a similar name exists: `GasEstimator`
|
this method takes 2 arguments but 1 argument was supplied:
crates/sim/src/estimation/v0_6/estimator.rs#L615
error[E0061]: this method takes 2 arguments but 1 argument was supplied
--> crates/sim/src/estimation/v0_6/estimator.rs:615:27
|
615 | let u_o = user_op.max_fill(&settings);
| ^^^^^^^^-----------
| ||
| |expected `U256`, found `&Settings`
| an argument of type `ethers::types::U256` is missing
|
note: method defined here
--> /home/runner/work/rundler/rundler/crates/types/src/user_operation/v0_6.rs:228:12
|
228 | pub fn max_fill(&self, max_call_gas: U256, max_verification_gas: U256) -> UserOperation {
| ^^^^^^^^
help: provide the argument
|
615 | let u_o = user_op.max_fill(/* ethers::types::U256 */, /* ethers::types::U256 */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
failed to resolve: use of undeclared type `GasEstimatorV0_6`:
crates/sim/src/estimation/v0_6/estimator.rs#L601
error[E0433]: failed to resolve: use of undeclared type `GasEstimatorV0_6`
--> crates/sim/src/estimation/v0_6/estimator.rs:601:73
|
601 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^
| |
| use of undeclared type `GasEstimatorV0_6`
| help: a struct with a similar name exists: `GasEstimator`
|
this method takes 2 arguments but 1 argument was supplied:
crates/sim/src/estimation/v0_6/estimator.rs#L557
error[E0061]: this method takes 2 arguments but 1 argument was supplied
--> crates/sim/src/estimation/v0_6/estimator.rs:557:27
|
557 | let u_o = user_op.max_fill(&settings);
| ^^^^^^^^-----------
| ||
| |expected `U256`, found `&Settings`
| an argument of type `ethers::types::U256` is missing
|
note: method defined here
--> /home/runner/work/rundler/rundler/crates/types/src/user_operation/v0_6.rs:228:12
|
228 | pub fn max_fill(&self, max_call_gas: U256, max_verification_gas: U256) -> UserOperation {
| ^^^^^^^^
help: provide the argument
|
557 | let u_o = user_op.max_fill(/* ethers::types::U256 */, /* ethers::types::U256 */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
failed to resolve: use of undeclared type `GasEstimatorV0_6`:
crates/sim/src/estimation/v0_6/estimator.rs#L490
error[E0433]: failed to resolve: use of undeclared type `GasEstimatorV0_6`
--> crates/sim/src/estimation/v0_6/estimator.rs:490:73
|
490 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^
| |
| use of undeclared type `GasEstimatorV0_6`
| help: a struct with a similar name exists: `GasEstimator`
|
failed to resolve: use of undeclared type `UserOperationVariant`:
crates/sim/src/precheck.rs#L699
error[E0433]: failed to resolve: use of undeclared type `UserOperationVariant`
--> crates/sim/src/precheck.rs:699:13
|
699 | UserOperationVariant::V0_6(v0_6::UserOperation {
| ^^^^^^^^^^^^^^^^^^^^ use of undeclared type `UserOperationVariant`
|
help: consider importing this enum
|
442 + use rundler_types::UserOperationVariant;
|
|
cannot find type `GasEstimatorV0_6` in this scope:
crates/sim/src/estimation/v0_6/estimator.rs#L1285
error[E0412]: cannot find type `GasEstimatorV0_6` in this scope
--> crates/sim/src/estimation/v0_6/estimator.rs:1285:24
|
75 | pub struct GasEstimator<P, E> {
| ----------------------------- similarly named struct `GasEstimator` defined here
...
1285 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `GasEstimator`
|
cannot find value `REQUIRED_VERIFICATION_GAS_LIMIT_BUFFER_V0_6` in module `simulation`:
crates/sim/src/estimation/v0_6/estimator.rs#L1208
error[E0425]: cannot find value `REQUIRED_VERIFICATION_GAS_LIMIT_BUFFER_V0_6` in module `simulation`
--> crates/sim/src/estimation/v0_6/estimator.rs:1208:41
|
1208 | gas_usage + simulation::REQUIRED_VERIFICATION_GAS_LIMIT_BUFFER_V0_6
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `simulation`
|
cannot find type `GasEstimatorV0_6` in this scope:
crates/sim/src/estimation/v0_6/estimator.rs#L661
error[E0412]: cannot find type `GasEstimatorV0_6` in this scope
--> crates/sim/src/estimation/v0_6/estimator.rs:661:24
|
75 | pub struct GasEstimator<P, E> {
| ----------------------------- similarly named struct `GasEstimator` defined here
...
661 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `GasEstimator`
|
cannot find type `GasEstimatorV0_6` in this scope:
crates/sim/src/estimation/v0_6/estimator.rs#L601
error[E0412]: cannot find type `GasEstimatorV0_6` in this scope
--> crates/sim/src/estimation/v0_6/estimator.rs:601:24
|
75 | pub struct GasEstimator<P, E> {
| ----------------------------- similarly named struct `GasEstimator` defined here
...
601 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `GasEstimator`
|
cannot find type `GasEstimatorV0_6` in this scope:
crates/sim/src/estimation/v0_6/estimator.rs#L490
error[E0412]: cannot find type `GasEstimatorV0_6` in this scope
--> crates/sim/src/estimation/v0_6/estimator.rs:490:24
|
75 | pub struct GasEstimator<P, E> {
| ----------------------------- similarly named struct `GasEstimator` defined here
...
490 | let estimator: GasEstimatorV0_6<MockProvider, MockEntryPoint> = GasEstimatorV0_6::new(
| ^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `GasEstimator`
|
cannot find type `GasEstimatorV0_6` in this scope:
crates/sim/src/estimation/v0_6/estimator.rs#L481
error[E0412]: cannot find type `GasEstimatorV0_6` in this scope
--> crates/sim/src/estimation/v0_6/estimator.rs:481:11
|
75 | pub struct GasEstimator<P, E> {
| ----------------------------- similarly named struct `GasEstimator` defined here
...
481 | ) -> (GasEstimatorV0_6<MockProvider, MockEntryPoint>, Settings) {
| ^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `GasEstimator`
|
cargo-deny
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|