From f3cc1162dda52e0fba72c8a9632405e4820c4599 Mon Sep 17 00:00:00 2001 From: arman-garousi-bitazza Date: Sat, 21 Feb 2026 16:46:48 +0330 Subject: [PATCH 1/2] feat: upgrade web3dart package from v2.7.3 to v3.0.2 --- example/etherspot_wallet/batch_transfer.dart | 1 + example/etherspot_wallet/erc20_transfer.dart | 1 + example/etherspot_wallet/transfer.dart | 1 + example/kernel/address.dart | 1 + example/kernel/batch_transfer.dart | 1 + example/kernel/erc20_transfer.dart | 1 + example/kernel/transfer.dart | 1 + example/simpleAccount/batch_transfer.dart | 1 + example/simpleAccount/erc20_transfer.dart | 1 + example/simpleAccount/transfer.dart | 1 + lib/src/builder.dart | 2 +- lib/src/client.dart | 2 +- lib/src/context.dart | 2 +- lib/src/preset/builder/etherspot_wallet.dart | 2 +- lib/src/preset/builder/kernel.dart | 4 +- lib/src/preset/builder/simple_account.dart | 2 +- lib/src/preset/middleware/gas_price.dart | 1 + lib/src/preset/middleware/signature.dart | 3 +- lib/src/typechain/ECDSAKernelFactory.g.dart | 23 +-- lib/src/typechain/ECDSAValidator.g.dart | 31 ++-- lib/src/typechain/EntryPoint.g.dart | 115 ++++++------- lib/src/typechain/EtherspotWallet.g.dart | 159 +++++++++--------- .../typechain/EtherspotWalletFactory.g.dart | 47 +++--- lib/src/typechain/Kernel.g.dart | 101 +++++------ lib/src/typechain/KernelFactory.g.dart | 37 ++-- lib/src/typechain/Multisend.g.dart | 7 +- lib/src/typechain/SimpleAccount.g.dart | 97 +++++------ lib/src/typechain/SimpleAccountFactory.g.dart | 15 +- lib/src/types.dart | 1 + lib/src/utils/contracts.dart | 1 + pubspec.yaml | 11 +- test/userop_test.dart | 1 + 32 files changed, 352 insertions(+), 322 deletions(-) diff --git a/example/etherspot_wallet/batch_transfer.dart b/example/etherspot_wallet/batch_transfer.dart index 56ddbb7..9e8a206 100644 --- a/example/etherspot_wallet/batch_transfer.dart +++ b/example/etherspot_wallet/batch_transfer.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; Future main(List arguments) async { final tokenAddress = arguments[0]; diff --git a/example/etherspot_wallet/erc20_transfer.dart b/example/etherspot_wallet/erc20_transfer.dart index 1787c6f..ed013d7 100644 --- a/example/etherspot_wallet/erc20_transfer.dart +++ b/example/etherspot_wallet/erc20_transfer.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; // import 'package:web3dart/crypto.dart'; Future main(List arguments) async { diff --git a/example/etherspot_wallet/transfer.dart b/example/etherspot_wallet/transfer.dart index 333d7f6..92bf0a0 100644 --- a/example/etherspot_wallet/transfer.dart +++ b/example/etherspot_wallet/transfer.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; /// Run this example with: dart example/transfer.dart TARGET_ADDRESS VALUE_IN_WEI diff --git a/example/kernel/address.dart b/example/kernel/address.dart index 9fd51fb..d7f24fb 100644 --- a/example/kernel/address.dart +++ b/example/kernel/address.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; /// Run this example with: dart example/address.dart diff --git a/example/kernel/batch_transfer.dart b/example/kernel/batch_transfer.dart index 3d6fb5d..1e00f57 100644 --- a/example/kernel/batch_transfer.dart +++ b/example/kernel/batch_transfer.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; Future main(List arguments) async { final tokenAddress = arguments[0]; diff --git a/example/kernel/erc20_transfer.dart b/example/kernel/erc20_transfer.dart index 522149c..22dc226 100644 --- a/example/kernel/erc20_transfer.dart +++ b/example/kernel/erc20_transfer.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; // import 'package:web3dart/crypto.dart'; Future main(List arguments) async { diff --git a/example/kernel/transfer.dart b/example/kernel/transfer.dart index 6c00e05..20d0ce7 100644 --- a/example/kernel/transfer.dart +++ b/example/kernel/transfer.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; /// Run this example with: dart example/transfer.dart TARGET_ADDRESS VALUE_IN_WEI diff --git a/example/simpleAccount/batch_transfer.dart b/example/simpleAccount/batch_transfer.dart index ee1e39e..25d4074 100644 --- a/example/simpleAccount/batch_transfer.dart +++ b/example/simpleAccount/batch_transfer.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; Future main(List arguments) async { final tokenAddress = arguments[0]; diff --git a/example/simpleAccount/erc20_transfer.dart b/example/simpleAccount/erc20_transfer.dart index 8ad4276..f7e647d 100644 --- a/example/simpleAccount/erc20_transfer.dart +++ b/example/simpleAccount/erc20_transfer.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; // import 'package:web3dart/crypto.dart'; Future main(List arguments) async { diff --git a/example/simpleAccount/transfer.dart b/example/simpleAccount/transfer.dart index e9ffa3e..7ca9bfb 100644 --- a/example/simpleAccount/transfer.dart +++ b/example/simpleAccount/transfer.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; /// Run this example with: dart example/transfer.dart TARGET_ADDRESS VALUE_IN_WEI diff --git a/lib/src/builder.dart b/lib/src/builder.dart index d9ae27a..b07b0ae 100644 --- a/lib/src/builder.dart +++ b/lib/src/builder.dart @@ -1,4 +1,4 @@ -import 'package:web3dart/web3dart.dart'; +import 'package:wallet/wallet.dart'; import './types.dart'; diff --git a/lib/src/client.dart b/lib/src/client.dart index 1cf620f..b79e40b 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1,5 +1,5 @@ import 'package:http/http.dart' as http; -import 'package:web3dart/crypto.dart'; +import 'package:wallet/wallet.dart'; import 'package:web3dart/web3dart.dart'; import 'package:userop/src/constants/erc_4337.dart'; diff --git a/lib/src/context.dart b/lib/src/context.dart index 712cd19..98c062d 100644 --- a/lib/src/context.dart +++ b/lib/src/context.dart @@ -1,6 +1,6 @@ import 'dart:typed_data'; -import 'package:web3dart/crypto.dart'; +import 'package:wallet/wallet.dart'; import 'package:web3dart/web3dart.dart'; import 'types.dart'; diff --git a/lib/src/preset/builder/etherspot_wallet.dart b/lib/src/preset/builder/etherspot_wallet.dart index 507b33c..ebab307 100644 --- a/lib/src/preset/builder/etherspot_wallet.dart +++ b/lib/src/preset/builder/etherspot_wallet.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; import 'package:http/http.dart' as http; -import 'package:web3dart/crypto.dart'; +import 'package:wallet/wallet.dart'; import '../../../userop.dart'; import '../../typechain/EtherspotWallet.g.dart' as etherspot_wallet_impl; diff --git a/lib/src/preset/builder/kernel.dart b/lib/src/preset/builder/kernel.dart index 4dfd6ef..1c36bbf 100644 --- a/lib/src/preset/builder/kernel.dart +++ b/lib/src/preset/builder/kernel.dart @@ -1,6 +1,6 @@ import 'dart:typed_data'; import 'package:eth_sig_util/util/abi.dart'; -import 'package:web3dart/crypto.dart'; +import 'package:wallet/wallet.dart'; import 'package:web3dart/json_rpc.dart'; import 'package:http/http.dart' as http; @@ -227,7 +227,7 @@ class Kernel extends UserOperationBuilder { ], [ 0, - e.to.addressBytes, + e.to.value, e.value, e.data.length, e.data, diff --git a/lib/src/preset/builder/simple_account.dart b/lib/src/preset/builder/simple_account.dart index fa6619c..e7c2e46 100644 --- a/lib/src/preset/builder/simple_account.dart +++ b/lib/src/preset/builder/simple_account.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; import 'package:http/http.dart' as http; -import 'package:web3dart/crypto.dart'; +import 'package:wallet/wallet.dart'; import '../../../userop.dart'; import '../../typechain/SimpleAccount.g.dart' as simple_account_impl; diff --git a/lib/src/preset/middleware/gas_price.dart b/lib/src/preset/middleware/gas_price.dart index b4500cd..d8072e9 100644 --- a/lib/src/preset/middleware/gas_price.dart +++ b/lib/src/preset/middleware/gas_price.dart @@ -1,3 +1,4 @@ +import 'package:wallet/wallet.dart'; import 'package:web3dart/web3dart.dart'; import 'package:userop/src/types.dart'; diff --git a/lib/src/preset/middleware/signature.dart b/lib/src/preset/middleware/signature.dart index c00cf2f..95c3db8 100644 --- a/lib/src/preset/middleware/signature.dart +++ b/lib/src/preset/middleware/signature.dart @@ -1,6 +1,5 @@ import 'package:userop/src/types.dart'; -import 'package:web3dart/credentials.dart'; -import 'package:web3dart/crypto.dart'; +import 'package:web3dart/web3dart.dart'; @Deprecated('eOASignature is deprecated. Replace with signUserOpHash.') UserOperationMiddlewareFn eOASignature(EthPrivateKey credentials) { diff --git a/lib/src/typechain/ECDSAKernelFactory.g.dart b/lib/src/typechain/ECDSAKernelFactory.g.dart index 99590f2..2bf620f 100644 --- a/lib/src/typechain/ECDSAKernelFactory.g.dart +++ b/lib/src/typechain/ECDSAKernelFactory.g.dart @@ -5,6 +5,7 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; +import 'package:wallet/wallet.dart' as _i2; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"contract KernelFactory","name":"_singletonFactory","type":"address"},{"internalType":"contract ECDSAValidator","name":"_validator","type":"address"},{"internalType":"contract IEntryPoint","name":"_entryPoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"createAccount","outputs":[{"internalType":"contract EIP1967Proxy","name":"proxy","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getAccountAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"singletonFactory","outputs":[{"internalType":"contract KernelFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validator","outputs":[{"internalType":"contract ECDSAValidator","name":"","type":"address"}],"stateMutability":"view","type":"function"}]', @@ -13,7 +14,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class ECDSAKernelFactory extends _i1.GeneratedContract { ECDSAKernelFactory({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -29,7 +30,7 @@ class ECDSAKernelFactory extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future createAccount( - ({_i1.EthereumAddress owner, BigInt index}) args, { + ({_i2.EthereumAddress owner, BigInt index}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -50,7 +51,7 @@ class ECDSAKernelFactory extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[2]; assert(checkSignature(function, 'b0d691fe')); final params = []; @@ -59,14 +60,14 @@ class ECDSAKernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> getAccountAddress( - ({_i1.EthereumAddress owner, BigInt index}) args, { + Future<_i2.EthereumAddress> getAccountAddress( + ({_i2.EthereumAddress owner, BigInt index}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[3]; @@ -80,13 +81,13 @@ class ECDSAKernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> singletonFactory({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> singletonFactory({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[4]; assert(checkSignature(function, 'bc10273e')); final params = []; @@ -95,13 +96,13 @@ class ECDSAKernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> validator({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> validator({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[5]; assert(checkSignature(function, '3a5381b5')); final params = []; @@ -110,6 +111,6 @@ class ECDSAKernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } } diff --git a/lib/src/typechain/ECDSAValidator.g.dart b/lib/src/typechain/ECDSAValidator.g.dart index e5c8051..2075b6b 100644 --- a/lib/src/typechain/ECDSAValidator.g.dart +++ b/lib/src/typechain/ECDSAValidator.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"kernel","type":"address"},{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"disable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ecdsaValidatorStorage","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"enable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"validateSignature","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"_userOp","type":"tuple"},{"internalType":"bytes32","name":"_userOpHash","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"validateUserOp","outputs":[{"internalType":"uint256","name":"validationData","type":"uint256"}],"stateMutability":"view","type":"function"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class ECDSAValidator extends _i1.GeneratedContract { ECDSAValidator({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -30,7 +31,7 @@ class ECDSAValidator extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future disable( - ({_i2.Uint8List $param0}) args, { + ({_i3.Uint8List $param0}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -48,8 +49,8 @@ class ECDSAValidator extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> ecdsaValidatorStorage( - ({_i1.EthereumAddress $param1}) args, { + Future<_i2.EthereumAddress> ecdsaValidatorStorage( + ({_i2.EthereumAddress $param1}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[1]; @@ -60,14 +61,14 @@ class ECDSAValidator extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future enable( - ({_i2.Uint8List data}) args, { + ({_i3.Uint8List data}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -86,7 +87,7 @@ class ECDSAValidator extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future validateSignature( - ({_i2.Uint8List hash, _i2.Uint8List signature}) args, { + ({_i3.Uint8List hash, _i3.Uint8List signature}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[3]; @@ -107,7 +108,7 @@ class ECDSAValidator extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future validateUserOp( - ({dynamic userOp, _i2.Uint8List userOpHash, BigInt $param7}) args, { + ({dynamic userOp, _i3.Uint8List userOpHash, BigInt $param7}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[4]; @@ -154,15 +155,15 @@ class OwnerChanged { OwnerChanged( List response, this.event, - ) : kernel = (response[0] as _i1.EthereumAddress), - oldOwner = (response[1] as _i1.EthereumAddress), - newOwner = (response[2] as _i1.EthereumAddress); + ) : kernel = (response[0] as _i2.EthereumAddress), + oldOwner = (response[1] as _i2.EthereumAddress), + newOwner = (response[2] as _i2.EthereumAddress); - final _i1.EthereumAddress kernel; + final _i2.EthereumAddress kernel; - final _i1.EthereumAddress oldOwner; + final _i2.EthereumAddress oldOwner; - final _i1.EthereumAddress newOwner; + final _i2.EthereumAddress newOwner; final _i1.FilterEvent event; } diff --git a/lib/src/typechain/EntryPoint.g.dart b/lib/src/typechain/EntryPoint.g.dart index 07387b8..001e4e2 100644 --- a/lib/src/typechain/EntryPoint.g.dart +++ b/lib/src/typechain/EntryPoint.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"uint256","name":"preOpGas","type":"uint256"},{"internalType":"uint256","name":"paid","type":"uint256"},{"internalType":"uint48","name":"validAfter","type":"uint48"},{"internalType":"uint48","name":"validUntil","type":"uint48"},{"internalType":"bool","name":"targetSuccess","type":"bool"},{"internalType":"bytes","name":"targetResult","type":"bytes"}],"name":"ExecutionResult","type":"error"},{"inputs":[{"internalType":"uint256","name":"opIndex","type":"uint256"},{"internalType":"string","name":"reason","type":"string"}],"name":"FailedOp","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"SenderAddressResult","type":"error"},{"inputs":[{"internalType":"address","name":"aggregator","type":"address"}],"name":"SignatureValidationFailed","type":"error"},{"inputs":[{"components":[{"internalType":"uint256","name":"preOpGas","type":"uint256"},{"internalType":"uint256","name":"prefund","type":"uint256"},{"internalType":"bool","name":"sigFailed","type":"bool"},{"internalType":"uint48","name":"validAfter","type":"uint48"},{"internalType":"uint48","name":"validUntil","type":"uint48"},{"internalType":"bytes","name":"paymasterContext","type":"bytes"}],"internalType":"struct IEntryPoint.ReturnInfo","name":"returnInfo","type":"tuple"},{"components":[{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"internalType":"struct IStakeManager.StakeInfo","name":"senderInfo","type":"tuple"},{"components":[{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"internalType":"struct IStakeManager.StakeInfo","name":"factoryInfo","type":"tuple"},{"components":[{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"internalType":"struct IStakeManager.StakeInfo","name":"paymasterInfo","type":"tuple"}],"name":"ValidationResult","type":"error"},{"inputs":[{"components":[{"internalType":"uint256","name":"preOpGas","type":"uint256"},{"internalType":"uint256","name":"prefund","type":"uint256"},{"internalType":"bool","name":"sigFailed","type":"bool"},{"internalType":"uint48","name":"validAfter","type":"uint48"},{"internalType":"uint48","name":"validUntil","type":"uint48"},{"internalType":"bytes","name":"paymasterContext","type":"bytes"}],"internalType":"struct IEntryPoint.ReturnInfo","name":"returnInfo","type":"tuple"},{"components":[{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"internalType":"struct IStakeManager.StakeInfo","name":"senderInfo","type":"tuple"},{"components":[{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"internalType":"struct IStakeManager.StakeInfo","name":"factoryInfo","type":"tuple"},{"components":[{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"internalType":"struct IStakeManager.StakeInfo","name":"paymasterInfo","type":"tuple"},{"components":[{"internalType":"address","name":"aggregator","type":"address"},{"components":[{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"internalType":"struct IStakeManager.StakeInfo","name":"stakeInfo","type":"tuple"}],"internalType":"struct IEntryPoint.AggregatorStakeInfo","name":"aggregatorInfo","type":"tuple"}],"name":"ValidationResultWithAggregation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"factory","type":"address"},{"indexed":false,"internalType":"address","name":"paymaster","type":"address"}],"name":"AccountDeployed","type":"event"},{"anonymous":false,"inputs":[],"name":"BeforeExecution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalDeposit","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"aggregator","type":"address"}],"name":"SignatureAggregatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalStaked","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unstakeDelaySec","type":"uint256"}],"name":"StakeLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawTime","type":"uint256"}],"name":"StakeUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"withdrawAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"paymaster","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"},{"indexed":false,"internalType":"uint256","name":"actualGasCost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"actualGasUsed","type":"uint256"}],"name":"UserOperationEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"revertReason","type":"bytes"}],"name":"UserOperationRevertReason","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"withdrawAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"SIG_VALIDATION_FAILED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"}],"name":"_validateSenderAndPaymaster","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"unstakeDelaySec","type":"uint32"}],"name":"addStake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"depositTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deposits","outputs":[{"internalType":"uint112","name":"deposit","type":"uint112"},{"internalType":"bool","name":"staked","type":"bool"},{"internalType":"uint112","name":"stake","type":"uint112"},{"internalType":"uint32","name":"unstakeDelaySec","type":"uint32"},{"internalType":"uint48","name":"withdrawTime","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getDepositInfo","outputs":[{"components":[{"internalType":"uint112","name":"deposit","type":"uint112"},{"internalType":"bool","name":"staked","type":"bool"},{"internalType":"uint112","name":"stake","type":"uint112"},{"internalType":"uint32","name":"unstakeDelaySec","type":"uint32"},{"internalType":"uint48","name":"withdrawTime","type":"uint48"}],"internalType":"struct IStakeManager.DepositInfo","name":"info","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint192","name":"key","type":"uint192"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"initCode","type":"bytes"}],"name":"getSenderAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"userOp","type":"tuple"}],"name":"getUserOpHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation[]","name":"userOps","type":"tuple[]"},{"internalType":"contract IAggregator","name":"aggregator","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct IEntryPoint.UserOpsPerAggregator[]","name":"opsPerAggregator","type":"tuple[]"},{"internalType":"address payable","name":"beneficiary","type":"address"}],"name":"handleAggregatedOps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation[]","name":"ops","type":"tuple[]"},{"internalType":"address payable","name":"beneficiary","type":"address"}],"name":"handleOps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint192","name":"key","type":"uint192"}],"name":"incrementNonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"callData","type":"bytes"},{"components":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"address","name":"paymaster","type":"address"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"}],"internalType":"struct EntryPoint.MemoryUserOp","name":"mUserOp","type":"tuple"},{"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"internalType":"uint256","name":"prefund","type":"uint256"},{"internalType":"uint256","name":"contextOffset","type":"uint256"},{"internalType":"uint256","name":"preOpGas","type":"uint256"}],"internalType":"struct EntryPoint.UserOpInfo","name":"opInfo","type":"tuple"},{"internalType":"bytes","name":"context","type":"bytes"}],"name":"innerHandleOp","outputs":[{"internalType":"uint256","name":"actualGasCost","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint192","name":"","type":"uint192"}],"name":"nonceSequenceNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"op","type":"tuple"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"targetCallData","type":"bytes"}],"name":"simulateHandleOp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"userOp","type":"tuple"}],"name":"simulateValidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"withdrawAddress","type":"address"}],"name":"withdrawStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"withdrawAddress","type":"address"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"withdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class EntryPoint extends _i1.GeneratedContract { EntryPoint({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -46,9 +47,9 @@ class EntryPoint extends _i1.GeneratedContract { /// latest on-chain block will be used. Future _validateSenderAndPaymaster( ({ - _i2.Uint8List initCode, - _i1.EthereumAddress sender, - _i2.Uint8List paymasterAndData + _i3.Uint8List initCode, + _i2.EthereumAddress sender, + _i3.Uint8List paymasterAndData }) args, { _i1.BlockNum? atBlock, }) async { @@ -89,7 +90,7 @@ class EntryPoint extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future balanceOf( - ({_i1.EthereumAddress account}) args, { + ({_i2.EthereumAddress account}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[3]; @@ -107,7 +108,7 @@ class EntryPoint extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future depositTo( - ({_i1.EthereumAddress account}) args, { + ({_i2.EthereumAddress account}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -126,7 +127,7 @@ class EntryPoint extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future deposits( - ({_i1.EthereumAddress $param6}) args, { + ({_i2.EthereumAddress $param6}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[5]; @@ -144,7 +145,7 @@ class EntryPoint extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future getDepositInfo( - ({_i1.EthereumAddress account}) args, { + ({_i2.EthereumAddress account}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[6]; @@ -162,7 +163,7 @@ class EntryPoint extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future getNonce( - ({_i1.EthereumAddress sender, BigInt key}) args, { + ({_i2.EthereumAddress sender, BigInt key}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[7]; @@ -183,7 +184,7 @@ class EntryPoint extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future getSenderAddress( - ({_i2.Uint8List initCode}) args, { + ({_i3.Uint8List initCode}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -201,7 +202,7 @@ class EntryPoint extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> getUserOpHash( + Future<_i3.Uint8List> getUserOpHash( ({dynamic userOp}) args, { _i1.BlockNum? atBlock, }) async { @@ -213,14 +214,14 @@ class EntryPoint extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future handleAggregatedOps( - ({List opsPerAggregator, _i1.EthereumAddress beneficiary}) args, { + ({List opsPerAggregator, _i2.EthereumAddress beneficiary}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -242,7 +243,7 @@ class EntryPoint extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future handleOps( - ({List ops, _i1.EthereumAddress beneficiary}) args, { + ({List ops, _i2.EthereumAddress beneficiary}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -283,7 +284,7 @@ class EntryPoint extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future innerHandleOp( - ({_i2.Uint8List callData, dynamic opInfo, _i2.Uint8List context}) args, { + ({_i3.Uint8List callData, dynamic opInfo, _i3.Uint8List context}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -306,7 +307,7 @@ class EntryPoint extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future nonceSequenceNumber( - ({_i1.EthereumAddress $param20, BigInt $param21}) args, { + ({_i2.EthereumAddress $param20, BigInt $param21}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[14]; @@ -329,8 +330,8 @@ class EntryPoint extends _i1.GeneratedContract { Future simulateHandleOp( ({ dynamic op, - _i1.EthereumAddress target, - _i2.Uint8List targetCallData + _i2.EthereumAddress target, + _i3.Uint8List targetCallData }) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, @@ -391,7 +392,7 @@ class EntryPoint extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future withdrawStake( - ({_i1.EthereumAddress withdrawAddress}) args, { + ({_i2.EthereumAddress withdrawAddress}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -410,7 +411,7 @@ class EntryPoint extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future withdrawTo( - ({_i1.EthereumAddress withdrawAddress, BigInt withdrawAmount}) args, { + ({_i2.EthereumAddress withdrawAddress, BigInt withdrawAmount}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -692,18 +693,18 @@ class AccountDeployed { AccountDeployed( List response, this.event, - ) : userOpHash = (response[0] as _i2.Uint8List), - sender = (response[1] as _i1.EthereumAddress), - factory = (response[2] as _i1.EthereumAddress), - paymaster = (response[3] as _i1.EthereumAddress); + ) : userOpHash = (response[0] as _i3.Uint8List), + sender = (response[1] as _i2.EthereumAddress), + factory = (response[2] as _i2.EthereumAddress), + paymaster = (response[3] as _i2.EthereumAddress); - final _i2.Uint8List userOpHash; + final _i3.Uint8List userOpHash; - final _i1.EthereumAddress sender; + final _i2.EthereumAddress sender; - final _i1.EthereumAddress factory; + final _i2.EthereumAddress factory; - final _i1.EthereumAddress paymaster; + final _i2.EthereumAddress paymaster; final _i1.FilterEvent event; } @@ -721,10 +722,10 @@ class Deposited { Deposited( List response, this.event, - ) : account = (response[0] as _i1.EthereumAddress), + ) : account = (response[0] as _i2.EthereumAddress), totalDeposit = (response[1] as BigInt); - final _i1.EthereumAddress account; + final _i2.EthereumAddress account; final BigInt totalDeposit; @@ -735,9 +736,9 @@ class SignatureAggregatorChanged { SignatureAggregatorChanged( List response, this.event, - ) : aggregator = (response[0] as _i1.EthereumAddress); + ) : aggregator = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress aggregator; + final _i2.EthereumAddress aggregator; final _i1.FilterEvent event; } @@ -746,11 +747,11 @@ class StakeLocked { StakeLocked( List response, this.event, - ) : account = (response[0] as _i1.EthereumAddress), + ) : account = (response[0] as _i2.EthereumAddress), totalStaked = (response[1] as BigInt), unstakeDelaySec = (response[2] as BigInt); - final _i1.EthereumAddress account; + final _i2.EthereumAddress account; final BigInt totalStaked; @@ -763,10 +764,10 @@ class StakeUnlocked { StakeUnlocked( List response, this.event, - ) : account = (response[0] as _i1.EthereumAddress), + ) : account = (response[0] as _i2.EthereumAddress), withdrawTime = (response[1] as BigInt); - final _i1.EthereumAddress account; + final _i2.EthereumAddress account; final BigInt withdrawTime; @@ -777,13 +778,13 @@ class StakeWithdrawn { StakeWithdrawn( List response, this.event, - ) : account = (response[0] as _i1.EthereumAddress), - withdrawAddress = (response[1] as _i1.EthereumAddress), + ) : account = (response[0] as _i2.EthereumAddress), + withdrawAddress = (response[1] as _i2.EthereumAddress), amount = (response[2] as BigInt); - final _i1.EthereumAddress account; + final _i2.EthereumAddress account; - final _i1.EthereumAddress withdrawAddress; + final _i2.EthereumAddress withdrawAddress; final BigInt amount; @@ -794,19 +795,19 @@ class UserOperationEvent { UserOperationEvent( List response, this.event, - ) : userOpHash = (response[0] as _i2.Uint8List), - sender = (response[1] as _i1.EthereumAddress), - paymaster = (response[2] as _i1.EthereumAddress), + ) : userOpHash = (response[0] as _i3.Uint8List), + sender = (response[1] as _i2.EthereumAddress), + paymaster = (response[2] as _i2.EthereumAddress), nonce = (response[3] as BigInt), success = (response[4] as bool), actualGasCost = (response[5] as BigInt), actualGasUsed = (response[6] as BigInt); - final _i2.Uint8List userOpHash; + final _i3.Uint8List userOpHash; - final _i1.EthereumAddress sender; + final _i2.EthereumAddress sender; - final _i1.EthereumAddress paymaster; + final _i2.EthereumAddress paymaster; final BigInt nonce; @@ -823,18 +824,18 @@ class UserOperationRevertReason { UserOperationRevertReason( List response, this.event, - ) : userOpHash = (response[0] as _i2.Uint8List), - sender = (response[1] as _i1.EthereumAddress), + ) : userOpHash = (response[0] as _i3.Uint8List), + sender = (response[1] as _i2.EthereumAddress), nonce = (response[2] as BigInt), - revertReason = (response[3] as _i2.Uint8List); + revertReason = (response[3] as _i3.Uint8List); - final _i2.Uint8List userOpHash; + final _i3.Uint8List userOpHash; - final _i1.EthereumAddress sender; + final _i2.EthereumAddress sender; final BigInt nonce; - final _i2.Uint8List revertReason; + final _i3.Uint8List revertReason; final _i1.FilterEvent event; } @@ -843,13 +844,13 @@ class Withdrawn { Withdrawn( List response, this.event, - ) : account = (response[0] as _i1.EthereumAddress), - withdrawAddress = (response[1] as _i1.EthereumAddress), + ) : account = (response[0] as _i2.EthereumAddress), + withdrawAddress = (response[1] as _i2.EthereumAddress), amount = (response[2] as BigInt); - final _i1.EthereumAddress account; + final _i2.EthereumAddress account; - final _i1.EthereumAddress withdrawAddress; + final _i2.EthereumAddress withdrawAddress; final BigInt amount; diff --git a/lib/src/typechain/EtherspotWallet.g.dart b/lib/src/typechain/EtherspotWallet.g.dart index c3ba7b6..88f5e20 100644 --- a/lib/src/typechain/EtherspotWallet.g.dart +++ b/lib/src/typechain/EtherspotWallet.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"contract IEntryPoint","name":"anEntryPoint","type":"address"},{"internalType":"contract IEtherspotWalletFactory","name":"anWalletFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IEntryPoint","name":"entryPoint","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"EtherspotWalletInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EtherspotWalletReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newGuardian","type":"address"}],"name":"GuardianAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"removedGuardian","type":"address"}],"name":"GuardianRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"removedOwner","type":"address"}],"name":"OwnerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"discardedBy","type":"address"}],"name":"ProposalDiscarded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"newOwnerProposed","type":"address"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"}],"name":"ProposalSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTimelock","type":"uint256"}],"name":"ProposalTimelockChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"newOwnerProposed","type":"address"},{"indexed":false,"internalType":"uint256","name":"approvalCount","type":"uint256"}],"name":"QuorumNotReached","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"addDeposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGuardian","type":"address"}],"name":"addGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTimelock","type":"uint256"}],"name":"changeProposalTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"discardCurrentProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dest","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"func","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"dest","type":"address[]"},{"internalType":"uint256[]","name":"value","type":"uint256[]"},{"internalType":"bytes[]","name":"func","type":"bytes[]"}],"name":"executeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"getProposal","outputs":[{"internalType":"address","name":"ownerProposed_","type":"address"},{"internalType":"uint256","name":"approvalCount_","type":"uint256"},{"internalType":"address[]","name":"guardiansApproved_","type":"address[]"},{"internalType":"bool","name":"resolved_","type":"bool"},{"internalType":"uint256","name":"proposedAt_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardianCosign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"guardianCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"guardianPropose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"anOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isGuardian","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"ownerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalTimelock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_guardian","type":"address"}],"name":"removeGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"userOp","type":"tuple"},{"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"internalType":"uint256","name":"missingAccountFunds","type":"uint256"}],"name":"validateUserOp","outputs":[{"internalType":"uint256","name":"validationData","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"withdrawAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawDepositTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class EtherspotWallet extends _i1.GeneratedContract { EtherspotWallet({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -48,7 +49,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future addGuardian( - ({_i1.EthereumAddress newGuardian}) args, { + ({_i2.EthereumAddress newGuardian}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -67,7 +68,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future addOwner( - ({_i1.EthereumAddress newOwner}) args, { + ({_i2.EthereumAddress newOwner}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -122,7 +123,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[6]; assert(checkSignature(function, 'b0d691fe')); final params = []; @@ -131,14 +132,14 @@ class EtherspotWallet extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future execute( - ({_i1.EthereumAddress dest, BigInt value, _i2.Uint8List func}) args, { + ({_i2.EthereumAddress dest, BigInt value, _i3.Uint8List func}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -162,9 +163,9 @@ class EtherspotWallet extends _i1.GeneratedContract { /// set by the contract. Future executeBatch( ({ - List<_i1.EthereumAddress> dest, + List<_i2.EthereumAddress> dest, List value, - List<_i2.Uint8List> func + List<_i3.Uint8List> func }) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, @@ -269,7 +270,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future guardianPropose( - ({_i1.EthereumAddress newOwner}) args, { + ({_i2.EthereumAddress newOwner}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -288,7 +289,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future initialize( - ({_i1.EthereumAddress anOwner}) args, { + ({_i2.EthereumAddress anOwner}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -307,7 +308,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future isGuardian( - ({_i1.EthereumAddress address}) args, { + ({_i2.EthereumAddress address}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[16]; @@ -325,7 +326,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future isOwner( - ({_i1.EthereumAddress address}) args, { + ({_i2.EthereumAddress address}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[17]; @@ -342,8 +343,8 @@ class EtherspotWallet extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> isValidSignature( - ({_i2.Uint8List hash, _i2.Uint8List signature}) args, { + Future<_i3.Uint8List> isValidSignature( + ({_i3.Uint8List hash, _i3.Uint8List signature}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[18]; @@ -357,19 +358,19 @@ class EtherspotWallet extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC1155BatchReceived( + Future<_i3.Uint8List> onERC1155BatchReceived( ({ - _i1.EthereumAddress $param16, - _i1.EthereumAddress $param17, + _i2.EthereumAddress $param16, + _i2.EthereumAddress $param17, List $param18, List $param19, - _i2.Uint8List $param20 + _i3.Uint8List $param20 }) args, { _i1.BlockNum? atBlock, }) async { @@ -387,19 +388,19 @@ class EtherspotWallet extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC1155Received( + Future<_i3.Uint8List> onERC1155Received( ({ - _i1.EthereumAddress $param21, - _i1.EthereumAddress $param22, + _i2.EthereumAddress $param21, + _i2.EthereumAddress $param22, BigInt $param23, BigInt $param24, - _i2.Uint8List $param25 + _i3.Uint8List $param25 }) args, { _i1.BlockNum? atBlock, }) async { @@ -417,18 +418,18 @@ class EtherspotWallet extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC721Received( + Future<_i3.Uint8List> onERC721Received( ({ - _i1.EthereumAddress $param26, - _i1.EthereumAddress $param27, + _i2.EthereumAddress $param26, + _i2.EthereumAddress $param27, BigInt $param28, - _i2.Uint8List $param29 + _i3.Uint8List $param29 }) args, { _i1.BlockNum? atBlock, }) async { @@ -445,7 +446,7 @@ class EtherspotWallet extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When @@ -496,7 +497,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> proxiableUUID({_i1.BlockNum? atBlock}) async { + Future<_i3.Uint8List> proxiableUUID({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[25]; assert(checkSignature(function, '52d1902d')); final params = []; @@ -505,14 +506,14 @@ class EtherspotWallet extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future removeGuardian( - ({_i1.EthereumAddress guardian}) args, { + ({_i2.EthereumAddress guardian}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -531,7 +532,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future removeOwner( - ({_i1.EthereumAddress owner}) args, { + ({_i2.EthereumAddress owner}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -550,7 +551,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future supportsInterface( - ({_i2.Uint8List interfaceId}) args, { + ({_i3.Uint8List interfaceId}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[28]; @@ -569,12 +570,12 @@ class EtherspotWallet extends _i1.GeneratedContract { /// latest on-chain block will be used. Future tokensReceived( ({ - _i1.EthereumAddress $param33, - _i1.EthereumAddress $param34, - _i1.EthereumAddress $param35, + _i2.EthereumAddress $param33, + _i2.EthereumAddress $param34, + _i2.EthereumAddress $param35, BigInt $param36, - _i2.Uint8List $param37, - _i2.Uint8List $param38 + _i3.Uint8List $param37, + _i3.Uint8List $param38 }) args, { _i1.BlockNum? atBlock, }) async { @@ -599,7 +600,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future upgradeTo( - ({_i1.EthereumAddress newImplementation}) args, { + ({_i2.EthereumAddress newImplementation}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -618,7 +619,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future upgradeToAndCall( - ({_i1.EthereumAddress newImplementation, _i2.Uint8List data}) args, { + ({_i2.EthereumAddress newImplementation, _i3.Uint8List data}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -642,7 +643,7 @@ class EtherspotWallet extends _i1.GeneratedContract { Future validateUserOp( ({ dynamic userOp, - _i2.Uint8List userOpHash, + _i3.Uint8List userOpHash, BigInt missingAccountFunds }) args, { required _i1.Credentials credentials, @@ -667,7 +668,7 @@ class EtherspotWallet extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future withdrawDepositTo( - ({_i1.EthereumAddress withdrawAddress, BigInt amount}) args, { + ({_i2.EthereumAddress withdrawAddress, BigInt amount}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -1024,18 +1025,18 @@ class EtherspotWallet extends _i1.GeneratedContract { class GetProposal { GetProposal(List response) - : ownerProposed = (response[0] as _i1.EthereumAddress), + : ownerProposed = (response[0] as _i2.EthereumAddress), approvalCount = (response[1] as BigInt), guardiansApproved = - (response[2] as List).cast<_i1.EthereumAddress>(), + (response[2] as List).cast<_i2.EthereumAddress>(), resolved = (response[3] as bool), proposedAt = (response[4] as BigInt); - final _i1.EthereumAddress ownerProposed; + final _i2.EthereumAddress ownerProposed; final BigInt approvalCount; - final List<_i1.EthereumAddress> guardiansApproved; + final List<_i2.EthereumAddress> guardiansApproved; final bool resolved; @@ -1046,12 +1047,12 @@ class AdminChanged { AdminChanged( List response, this.event, - ) : previousAdmin = (response[0] as _i1.EthereumAddress), - newAdmin = (response[1] as _i1.EthereumAddress); + ) : previousAdmin = (response[0] as _i2.EthereumAddress), + newAdmin = (response[1] as _i2.EthereumAddress); - final _i1.EthereumAddress previousAdmin; + final _i2.EthereumAddress previousAdmin; - final _i1.EthereumAddress newAdmin; + final _i2.EthereumAddress newAdmin; final _i1.FilterEvent event; } @@ -1060,9 +1061,9 @@ class BeaconUpgraded { BeaconUpgraded( List response, this.event, - ) : beacon = (response[0] as _i1.EthereumAddress); + ) : beacon = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress beacon; + final _i2.EthereumAddress beacon; final _i1.FilterEvent event; } @@ -1071,12 +1072,12 @@ class EtherspotWalletInitialized { EtherspotWalletInitialized( List response, this.event, - ) : entryPoint = (response[0] as _i1.EthereumAddress), - owner = (response[1] as _i1.EthereumAddress); + ) : entryPoint = (response[0] as _i2.EthereumAddress), + owner = (response[1] as _i2.EthereumAddress); - final _i1.EthereumAddress entryPoint; + final _i2.EthereumAddress entryPoint; - final _i1.EthereumAddress owner; + final _i2.EthereumAddress owner; final _i1.FilterEvent event; } @@ -1085,10 +1086,10 @@ class EtherspotWalletReceived { EtherspotWalletReceived( List response, this.event, - ) : from = (response[0] as _i1.EthereumAddress), + ) : from = (response[0] as _i2.EthereumAddress), amount = (response[1] as BigInt); - final _i1.EthereumAddress from; + final _i2.EthereumAddress from; final BigInt amount; @@ -1099,9 +1100,9 @@ class GuardianAdded { GuardianAdded( List response, this.event, - ) : newGuardian = (response[0] as _i1.EthereumAddress); + ) : newGuardian = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress newGuardian; + final _i2.EthereumAddress newGuardian; final _i1.FilterEvent event; } @@ -1110,9 +1111,9 @@ class GuardianRemoved { GuardianRemoved( List response, this.event, - ) : removedGuardian = (response[0] as _i1.EthereumAddress); + ) : removedGuardian = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress removedGuardian; + final _i2.EthereumAddress removedGuardian; final _i1.FilterEvent event; } @@ -1132,9 +1133,9 @@ class OwnerAdded { OwnerAdded( List response, this.event, - ) : newOwner = (response[0] as _i1.EthereumAddress); + ) : newOwner = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress newOwner; + final _i2.EthereumAddress newOwner; final _i1.FilterEvent event; } @@ -1143,9 +1144,9 @@ class OwnerRemoved { OwnerRemoved( List response, this.event, - ) : removedOwner = (response[0] as _i1.EthereumAddress); + ) : removedOwner = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress removedOwner; + final _i2.EthereumAddress removedOwner; final _i1.FilterEvent event; } @@ -1155,11 +1156,11 @@ class ProposalDiscarded { List response, this.event, ) : proposalId = (response[0] as BigInt), - discardedBy = (response[1] as _i1.EthereumAddress); + discardedBy = (response[1] as _i2.EthereumAddress); final BigInt proposalId; - final _i1.EthereumAddress discardedBy; + final _i2.EthereumAddress discardedBy; final _i1.FilterEvent event; } @@ -1169,14 +1170,14 @@ class ProposalSubmitted { List response, this.event, ) : proposalId = (response[0] as BigInt), - newOwnerProposed = (response[1] as _i1.EthereumAddress), - proposer = (response[2] as _i1.EthereumAddress); + newOwnerProposed = (response[1] as _i2.EthereumAddress), + proposer = (response[2] as _i2.EthereumAddress); final BigInt proposalId; - final _i1.EthereumAddress newOwnerProposed; + final _i2.EthereumAddress newOwnerProposed; - final _i1.EthereumAddress proposer; + final _i2.EthereumAddress proposer; final _i1.FilterEvent event; } @@ -1197,12 +1198,12 @@ class QuorumNotReached { List response, this.event, ) : proposalId = (response[0] as BigInt), - newOwnerProposed = (response[1] as _i1.EthereumAddress), + newOwnerProposed = (response[1] as _i2.EthereumAddress), approvalCount = (response[2] as BigInt); final BigInt proposalId; - final _i1.EthereumAddress newOwnerProposed; + final _i2.EthereumAddress newOwnerProposed; final BigInt approvalCount; @@ -1213,9 +1214,9 @@ class Upgraded { Upgraded( List response, this.event, - ) : implementation = (response[0] as _i1.EthereumAddress); + ) : implementation = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress implementation; + final _i2.EthereumAddress implementation; final _i1.FilterEvent event; } diff --git a/lib/src/typechain/EtherspotWalletFactory.g.dart b/lib/src/typechain/EtherspotWalletFactory.g.dart index b957d4f..42bde84 100644 --- a/lib/src/typechain/EtherspotWalletFactory.g.dart +++ b/lib/src/typechain/EtherspotWalletFactory.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"AccountCreation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"ImplementationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"inputs":[],"name":"accountCreationCode","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"accountImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_impl","type":"address"}],"name":"checkImplementation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"createAccount","outputs":[{"internalType":"address","name":"ret","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getAddress","outputs":[{"internalType":"address","name":"proxy","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract EtherspotWallet","name":"_newImpl","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class EtherspotWalletFactory extends _i1.GeneratedContract { EtherspotWalletFactory({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -29,7 +30,7 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> accountCreationCode({_i1.BlockNum? atBlock}) async { + Future<_i3.Uint8List> accountCreationCode({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[1]; assert(checkSignature(function, '31c884df')); final params = []; @@ -38,13 +39,13 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> accountImplementation( + Future<_i2.EthereumAddress> accountImplementation( {_i1.BlockNum? atBlock}) async { final function = self.abi.functions[2]; assert(checkSignature(function, '11464fbe')); @@ -54,14 +55,14 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future changeOwner( - ({_i1.EthereumAddress newOwner}) args, { + ({_i2.EthereumAddress newOwner}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -80,7 +81,7 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future checkImplementation( - ({_i1.EthereumAddress impl}) args, { + ({_i2.EthereumAddress impl}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[4]; @@ -98,7 +99,7 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future createAccount( - ({_i1.EthereumAddress owner, BigInt index}) args, { + ({_i2.EthereumAddress owner, BigInt index}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -119,8 +120,8 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> getAddress( - ({_i1.EthereumAddress owner, BigInt index}) args, { + Future<_i2.EthereumAddress> getAddress( + ({_i2.EthereumAddress owner, BigInt index}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[6]; @@ -134,13 +135,13 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> owner({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> owner({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[7]; assert(checkSignature(function, '8da5cb5b')); final params = []; @@ -149,14 +150,14 @@ class EtherspotWalletFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future setImplementation( - ({_i1.EthereumAddress newImpl}) args, { + ({_i2.EthereumAddress newImpl}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -248,13 +249,13 @@ class AccountCreation { AccountCreation( List response, this.event, - ) : wallet = (response[0] as _i1.EthereumAddress), - owner = (response[1] as _i1.EthereumAddress), + ) : wallet = (response[0] as _i2.EthereumAddress), + owner = (response[1] as _i2.EthereumAddress), index = (response[2] as BigInt); - final _i1.EthereumAddress wallet; + final _i2.EthereumAddress wallet; - final _i1.EthereumAddress owner; + final _i2.EthereumAddress owner; final BigInt index; @@ -265,9 +266,9 @@ class ImplementationSet { ImplementationSet( List response, this.event, - ) : newImplementation = (response[0] as _i1.EthereumAddress); + ) : newImplementation = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress newImplementation; + final _i2.EthereumAddress newImplementation; final _i1.FilterEvent event; } @@ -276,9 +277,9 @@ class OwnerChanged { OwnerChanged( List response, this.event, - ) : newOwner = (response[0] as _i1.EthereumAddress); + ) : newOwner = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress newOwner; + final _i2.EthereumAddress newOwner; final _i1.FilterEvent event; } diff --git a/lib/src/typechain/Kernel.g.dart b/lib/src/typechain/Kernel.g.dart index d507b3c..9108e85 100644 --- a/lib/src/typechain/Kernel.g.dart +++ b/lib/src/typechain/Kernel.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"contract IEntryPoint","name":"_entryPoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldValidator","type":"address"},{"indexed":true,"internalType":"address","name":"newValidator","type":"address"}],"name":"DefaultValidatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"ExecutionChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newImplementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"bytes4","name":"_disableFlag","type":"bytes4"}],"name":"disableMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Operation","name":"operation","type":"uint8"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDefaultValidator","outputs":[{"internalType":"contract IKernelValidator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDisabledMode","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"getExecution","outputs":[{"components":[{"internalType":"uint48","name":"validUntil","type":"uint48"},{"internalType":"uint48","name":"validAfter","type":"uint48"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"contract IKernelValidator","name":"validator","type":"address"}],"internalType":"struct ExecutionDetail","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastDisabledTime","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint192","name":"key","type":"uint192"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IKernelValidator","name":"_defaultValidator","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract IKernelValidator","name":"_defaultValidator","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"setDefaultValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"contract IKernelValidator","name":"_validator","type":"address"},{"internalType":"uint48","name":"_validUntil","type":"uint48"},{"internalType":"uint48","name":"_validAfter","type":"uint48"},{"internalType":"bytes","name":"_enableData","type":"bytes"}],"name":"setExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"userOp","type":"tuple"},{"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"internalType":"uint256","name":"missingAccountFunds","type":"uint256"}],"name":"validateUserOp","outputs":[{"internalType":"uint256","name":"validationData","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class Kernel extends _i1.GeneratedContract { Kernel({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -30,7 +31,7 @@ class Kernel extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future disableMode( - ({_i2.Uint8List disableFlag}) args, { + ({_i3.Uint8List disableFlag}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -48,7 +49,7 @@ class Kernel extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[3]; assert(checkSignature(function, 'b0d691fe')); final params = []; @@ -57,7 +58,7 @@ class Kernel extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [transaction] parameter can be used to override parameters @@ -65,9 +66,9 @@ class Kernel extends _i1.GeneratedContract { /// set by the contract. Future execute( ({ - _i1.EthereumAddress to, + _i2.EthereumAddress to, BigInt value, - _i2.Uint8List data, + _i3.Uint8List data, BigInt operation }) args, { required _i1.Credentials credentials, @@ -92,7 +93,7 @@ class Kernel extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> getDefaultValidator( + Future<_i2.EthereumAddress> getDefaultValidator( {_i1.BlockNum? atBlock}) async { final function = self.abi.functions[5]; assert(checkSignature(function, '0b3dc354')); @@ -102,13 +103,13 @@ class Kernel extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> getDisabledMode({_i1.BlockNum? atBlock}) async { + Future<_i3.Uint8List> getDisabledMode({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[6]; assert(checkSignature(function, '57b75047')); final params = []; @@ -117,14 +118,14 @@ class Kernel extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future getExecution( - ({_i2.Uint8List selector}) args, { + ({_i3.Uint8List selector}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[7]; @@ -190,7 +191,7 @@ class Kernel extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future initialize( - ({_i1.EthereumAddress defaultValidator, _i2.Uint8List data}) args, { + ({_i2.EthereumAddress defaultValidator, _i3.Uint8List data}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -211,8 +212,8 @@ class Kernel extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> isValidSignature( - ({_i2.Uint8List hash, _i2.Uint8List signature}) args, { + Future<_i3.Uint8List> isValidSignature( + ({_i3.Uint8List hash, _i3.Uint8List signature}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[12]; @@ -226,7 +227,7 @@ class Kernel extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When @@ -247,13 +248,13 @@ class Kernel extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC1155BatchReceived( + Future<_i3.Uint8List> onERC1155BatchReceived( ({ - _i1.EthereumAddress $param11, - _i1.EthereumAddress $param12, + _i2.EthereumAddress $param11, + _i2.EthereumAddress $param12, List $param13, List $param14, - _i2.Uint8List $param15 + _i3.Uint8List $param15 }) args, { _i1.BlockNum? atBlock, }) async { @@ -271,19 +272,19 @@ class Kernel extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC1155Received( + Future<_i3.Uint8List> onERC1155Received( ({ - _i1.EthereumAddress $param16, - _i1.EthereumAddress $param17, + _i2.EthereumAddress $param16, + _i2.EthereumAddress $param17, BigInt $param18, BigInt $param19, - _i2.Uint8List $param20 + _i3.Uint8List $param20 }) args, { _i1.BlockNum? atBlock, }) async { @@ -301,18 +302,18 @@ class Kernel extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC721Received( + Future<_i3.Uint8List> onERC721Received( ({ - _i1.EthereumAddress $param21, - _i1.EthereumAddress $param22, + _i2.EthereumAddress $param21, + _i2.EthereumAddress $param22, BigInt $param23, - _i2.Uint8List $param24 + _i3.Uint8List $param24 }) args, { _i1.BlockNum? atBlock, }) async { @@ -329,14 +330,14 @@ class Kernel extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future setDefaultValidator( - ({_i1.EthereumAddress defaultValidator, _i2.Uint8List data}) args, { + ({_i2.EthereumAddress defaultValidator, _i3.Uint8List data}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -359,12 +360,12 @@ class Kernel extends _i1.GeneratedContract { /// set by the contract. Future setExecution( ({ - _i2.Uint8List selector, - _i1.EthereumAddress executor, - _i1.EthereumAddress validator, + _i3.Uint8List selector, + _i2.EthereumAddress executor, + _i2.EthereumAddress validator, BigInt validUntil, BigInt validAfter, - _i2.Uint8List enableData + _i3.Uint8List enableData }) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, @@ -391,7 +392,7 @@ class Kernel extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future upgradeTo( - ({_i1.EthereumAddress newImplementation}) args, { + ({_i2.EthereumAddress newImplementation}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -412,7 +413,7 @@ class Kernel extends _i1.GeneratedContract { Future validateUserOp( ({ dynamic userOp, - _i2.Uint8List userOpHash, + _i3.Uint8List userOpHash, BigInt missingAccountFunds }) args, { required _i1.Credentials credentials, @@ -525,12 +526,12 @@ class DefaultValidatorChanged { DefaultValidatorChanged( List response, this.event, - ) : oldValidator = (response[0] as _i1.EthereumAddress), - newValidator = (response[1] as _i1.EthereumAddress); + ) : oldValidator = (response[0] as _i2.EthereumAddress), + newValidator = (response[1] as _i2.EthereumAddress); - final _i1.EthereumAddress oldValidator; + final _i2.EthereumAddress oldValidator; - final _i1.EthereumAddress newValidator; + final _i2.EthereumAddress newValidator; final _i1.FilterEvent event; } @@ -539,15 +540,15 @@ class ExecutionChanged { ExecutionChanged( List response, this.event, - ) : selector = (response[0] as _i2.Uint8List), - executor = (response[1] as _i1.EthereumAddress), - validator = (response[2] as _i1.EthereumAddress); + ) : selector = (response[0] as _i3.Uint8List), + executor = (response[1] as _i2.EthereumAddress), + validator = (response[2] as _i2.EthereumAddress); - final _i2.Uint8List selector; + final _i3.Uint8List selector; - final _i1.EthereumAddress executor; + final _i2.EthereumAddress executor; - final _i1.EthereumAddress validator; + final _i2.EthereumAddress validator; final _i1.FilterEvent event; } @@ -556,9 +557,9 @@ class Upgraded { Upgraded( List response, this.event, - ) : newImplementation = (response[0] as _i1.EthereumAddress); + ) : newImplementation = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress newImplementation; + final _i2.EthereumAddress newImplementation; final _i1.FilterEvent event; } diff --git a/lib/src/typechain/KernelFactory.g.dart b/lib/src/typechain/KernelFactory.g.dart index 0d7ff34..f4a88f4 100644 --- a/lib/src/typechain/KernelFactory.g.dart +++ b/lib/src/typechain/KernelFactory.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"contract IEntryPoint","name":"_entryPoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"AccountCreated","type":"event"},{"inputs":[{"internalType":"contract IKernelValidator","name":"_validator","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"createAccount","outputs":[{"internalType":"contract EIP1967Proxy","name":"proxy","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IKernelValidator","name":"_validator","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getAccountAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kernelTemplate","outputs":[{"internalType":"contract TempKernel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTemplate","outputs":[{"internalType":"contract Kernel","name":"","type":"address"}],"stateMutability":"view","type":"function"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class KernelFactory extends _i1.GeneratedContract { KernelFactory({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -30,7 +31,7 @@ class KernelFactory extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future createAccount( - ({_i1.EthereumAddress validator, _i2.Uint8List data, BigInt index}) args, { + ({_i2.EthereumAddress validator, _i3.Uint8List data, BigInt index}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -52,7 +53,7 @@ class KernelFactory extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[2]; assert(checkSignature(function, 'b0d691fe')); final params = []; @@ -61,14 +62,14 @@ class KernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> getAccountAddress( - ({_i1.EthereumAddress validator, _i2.Uint8List data, BigInt index}) args, { + Future<_i2.EthereumAddress> getAccountAddress( + ({_i2.EthereumAddress validator, _i3.Uint8List data, BigInt index}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[3]; @@ -83,13 +84,13 @@ class KernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> kernelTemplate({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> kernelTemplate({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[4]; assert(checkSignature(function, '037637aa')); final params = []; @@ -98,13 +99,13 @@ class KernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> nextTemplate({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> nextTemplate({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[5]; assert(checkSignature(function, '6c2f70fd')); final params = []; @@ -113,7 +114,7 @@ class KernelFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// Returns a live stream of all AccountCreated events emitted by this contract. @@ -145,16 +146,16 @@ class AccountCreated { AccountCreated( List response, this.event, - ) : account = (response[0] as _i1.EthereumAddress), - validator = (response[1] as _i1.EthereumAddress), - data = (response[2] as _i2.Uint8List), + ) : account = (response[0] as _i2.EthereumAddress), + validator = (response[1] as _i2.EthereumAddress), + data = (response[2] as _i3.Uint8List), index = (response[3] as BigInt); - final _i1.EthereumAddress account; + final _i2.EthereumAddress account; - final _i1.EthereumAddress validator; + final _i2.EthereumAddress validator; - final _i2.Uint8List data; + final _i3.Uint8List data; final BigInt index; diff --git a/lib/src/typechain/Multisend.g.dart b/lib/src/typechain/Multisend.g.dart index 5538a3c..1e56fa2 100644 --- a/lib/src/typechain/Multisend.g.dart +++ b/lib/src/typechain/Multisend.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes","name":"transactions","type":"bytes"}],"name":"multiSend","outputs":[],"stateMutability":"payable","type":"function"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class Multisend extends _i1.GeneratedContract { Multisend({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -30,7 +31,7 @@ class Multisend extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future multiSend( - ({_i2.Uint8List transactions}) args, { + ({_i3.Uint8List transactions}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { diff --git a/lib/src/typechain/SimpleAccount.g.dart b/lib/src/typechain/SimpleAccount.g.dart index b9baf03..1605fe0 100644 --- a/lib/src/typechain/SimpleAccount.g.dart +++ b/lib/src/typechain/SimpleAccount.g.dart @@ -5,7 +5,8 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; -import 'dart:typed_data' as _i2; +import 'package:wallet/wallet.dart' as _i2; +import 'dart:typed_data' as _i3; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"contract IEntryPoint","name":"anEntryPoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IEntryPoint","name":"entryPoint","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"SimpleAccountInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"addDeposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dest","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"func","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"dest","type":"address[]"},{"internalType":"bytes[]","name":"func","type":"bytes[]"}],"name":"executeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"anOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"userOp","type":"tuple"},{"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"internalType":"uint256","name":"missingAccountFunds","type":"uint256"}],"name":"validateUserOp","outputs":[{"internalType":"uint256","name":"validationData","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"withdrawAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawDepositTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]', @@ -14,7 +15,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class SimpleAccount extends _i1.GeneratedContract { SimpleAccount({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -47,7 +48,7 @@ class SimpleAccount extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> entryPoint({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[2]; assert(checkSignature(function, 'b0d691fe')); final params = []; @@ -56,14 +57,14 @@ class SimpleAccount extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future execute( - ({_i1.EthereumAddress dest, BigInt value, _i2.Uint8List func}) args, { + ({_i2.EthereumAddress dest, BigInt value, _i3.Uint8List func}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -86,7 +87,7 @@ class SimpleAccount extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future executeBatch( - ({List<_i1.EthereumAddress> dest, List<_i2.Uint8List> func}) args, { + ({List<_i2.EthereumAddress> dest, List<_i3.Uint8List> func}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -138,7 +139,7 @@ class SimpleAccount extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future initialize( - ({_i1.EthereumAddress anOwner}) args, { + ({_i2.EthereumAddress anOwner}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -156,13 +157,13 @@ class SimpleAccount extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC1155BatchReceived( + Future<_i3.Uint8List> onERC1155BatchReceived( ({ - _i1.EthereumAddress $param6, - _i1.EthereumAddress $param7, + _i2.EthereumAddress $param6, + _i2.EthereumAddress $param7, List $param8, List $param9, - _i2.Uint8List $param10 + _i3.Uint8List $param10 }) args, { _i1.BlockNum? atBlock, }) async { @@ -180,19 +181,19 @@ class SimpleAccount extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC1155Received( + Future<_i3.Uint8List> onERC1155Received( ({ - _i1.EthereumAddress $param11, - _i1.EthereumAddress $param12, + _i2.EthereumAddress $param11, + _i2.EthereumAddress $param12, BigInt $param13, BigInt $param14, - _i2.Uint8List $param15 + _i3.Uint8List $param15 }) args, { _i1.BlockNum? atBlock, }) async { @@ -210,18 +211,18 @@ class SimpleAccount extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> onERC721Received( + Future<_i3.Uint8List> onERC721Received( ({ - _i1.EthereumAddress $param16, - _i1.EthereumAddress $param17, + _i2.EthereumAddress $param16, + _i2.EthereumAddress $param17, BigInt $param18, - _i2.Uint8List $param19 + _i3.Uint8List $param19 }) args, { _i1.BlockNum? atBlock, }) async { @@ -238,13 +239,13 @@ class SimpleAccount extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> owner({_i1.BlockNum? atBlock}) async { + Future<_i2.EthereumAddress> owner({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[11]; assert(checkSignature(function, '8da5cb5b')); final params = []; @@ -253,13 +254,13 @@ class SimpleAccount extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i2.Uint8List> proxiableUUID({_i1.BlockNum? atBlock}) async { + Future<_i3.Uint8List> proxiableUUID({_i1.BlockNum? atBlock}) async { final function = self.abi.functions[12]; assert(checkSignature(function, '52d1902d')); final params = []; @@ -268,14 +269,14 @@ class SimpleAccount extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i2.Uint8List); + return (response[0] as _i3.Uint8List); } /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. Future supportsInterface( - ({_i2.Uint8List interfaceId}) args, { + ({_i3.Uint8List interfaceId}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[13]; @@ -294,12 +295,12 @@ class SimpleAccount extends _i1.GeneratedContract { /// latest on-chain block will be used. Future tokensReceived( ({ - _i1.EthereumAddress $param21, - _i1.EthereumAddress $param22, - _i1.EthereumAddress $param23, + _i2.EthereumAddress $param21, + _i2.EthereumAddress $param22, + _i2.EthereumAddress $param23, BigInt $param24, - _i2.Uint8List $param25, - _i2.Uint8List $param26 + _i3.Uint8List $param25, + _i3.Uint8List $param26 }) args, { _i1.BlockNum? atBlock, }) async { @@ -324,7 +325,7 @@ class SimpleAccount extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future upgradeTo( - ({_i1.EthereumAddress newImplementation}) args, { + ({_i2.EthereumAddress newImplementation}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -343,7 +344,7 @@ class SimpleAccount extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future upgradeToAndCall( - ({_i1.EthereumAddress newImplementation, _i2.Uint8List data}) args, { + ({_i2.EthereumAddress newImplementation, _i3.Uint8List data}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -367,7 +368,7 @@ class SimpleAccount extends _i1.GeneratedContract { Future validateUserOp( ({ dynamic userOp, - _i2.Uint8List userOpHash, + _i3.Uint8List userOpHash, BigInt missingAccountFunds }) args, { required _i1.Credentials credentials, @@ -392,7 +393,7 @@ class SimpleAccount extends _i1.GeneratedContract { /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future withdrawDepositTo( - ({_i1.EthereumAddress withdrawAddress, BigInt amount}) args, { + ({_i2.EthereumAddress withdrawAddress, BigInt amount}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -535,12 +536,12 @@ class AdminChanged { AdminChanged( List response, this.event, - ) : previousAdmin = (response[0] as _i1.EthereumAddress), - newAdmin = (response[1] as _i1.EthereumAddress); + ) : previousAdmin = (response[0] as _i2.EthereumAddress), + newAdmin = (response[1] as _i2.EthereumAddress); - final _i1.EthereumAddress previousAdmin; + final _i2.EthereumAddress previousAdmin; - final _i1.EthereumAddress newAdmin; + final _i2.EthereumAddress newAdmin; final _i1.FilterEvent event; } @@ -549,9 +550,9 @@ class BeaconUpgraded { BeaconUpgraded( List response, this.event, - ) : beacon = (response[0] as _i1.EthereumAddress); + ) : beacon = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress beacon; + final _i2.EthereumAddress beacon; final _i1.FilterEvent event; } @@ -571,12 +572,12 @@ class SimpleAccountInitialized { SimpleAccountInitialized( List response, this.event, - ) : entryPoint = (response[0] as _i1.EthereumAddress), - owner = (response[1] as _i1.EthereumAddress); + ) : entryPoint = (response[0] as _i2.EthereumAddress), + owner = (response[1] as _i2.EthereumAddress); - final _i1.EthereumAddress entryPoint; + final _i2.EthereumAddress entryPoint; - final _i1.EthereumAddress owner; + final _i2.EthereumAddress owner; final _i1.FilterEvent event; } @@ -585,9 +586,9 @@ class Upgraded { Upgraded( List response, this.event, - ) : implementation = (response[0] as _i1.EthereumAddress); + ) : implementation = (response[0] as _i2.EthereumAddress); - final _i1.EthereumAddress implementation; + final _i2.EthereumAddress implementation; final _i1.FilterEvent event; } diff --git a/lib/src/typechain/SimpleAccountFactory.g.dart b/lib/src/typechain/SimpleAccountFactory.g.dart index 4bfda99..42b95f7 100644 --- a/lib/src/typechain/SimpleAccountFactory.g.dart +++ b/lib/src/typechain/SimpleAccountFactory.g.dart @@ -5,6 +5,7 @@ // ignore_for_file: unused_local_variable, unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:web3dart/web3dart.dart' as _i1; +import 'package:wallet/wallet.dart' as _i2; final _contractAbi = _i1.ContractAbi.fromJson( '[{"inputs":[{"internalType":"contract IEntryPoint","name":"_entryPoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"accountImplementation","outputs":[{"internalType":"contract SimpleAccount","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"createAccount","outputs":[{"internalType":"contract SimpleAccount","name":"ret","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]', @@ -13,7 +14,7 @@ final _contractAbi = _i1.ContractAbi.fromJson( class SimpleAccountFactory extends _i1.GeneratedContract { SimpleAccountFactory({ - required _i1.EthereumAddress address, + required _i2.EthereumAddress address, required _i1.Web3Client client, int? chainId, }) : super( @@ -28,7 +29,7 @@ class SimpleAccountFactory extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> accountImplementation( + Future<_i2.EthereumAddress> accountImplementation( {_i1.BlockNum? atBlock}) async { final function = self.abi.functions[1]; assert(checkSignature(function, '11464fbe')); @@ -38,14 +39,14 @@ class SimpleAccountFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } /// The optional [transaction] parameter can be used to override parameters /// like the gas price, nonce and max gas. The `data` and `to` fields will be /// set by the contract. Future createAccount( - ({_i1.EthereumAddress owner, BigInt salt}) args, { + ({_i2.EthereumAddress owner, BigInt salt}) args, { required _i1.Credentials credentials, _i1.Transaction? transaction, }) async { @@ -66,8 +67,8 @@ class SimpleAccountFactory extends _i1.GeneratedContract { /// The optional [atBlock] parameter can be used to view historical data. When /// set, the function will be evaluated in the specified block. By default, the /// latest on-chain block will be used. - Future<_i1.EthereumAddress> getAddress( - ({_i1.EthereumAddress owner, BigInt salt}) args, { + Future<_i2.EthereumAddress> getAddress( + ({_i2.EthereumAddress owner, BigInt salt}) args, { _i1.BlockNum? atBlock, }) async { final function = self.abi.functions[3]; @@ -81,6 +82,6 @@ class SimpleAccountFactory extends _i1.GeneratedContract { params, atBlock, ); - return (response[0] as _i1.EthereumAddress); + return (response[0] as _i2.EthereumAddress); } } diff --git a/lib/src/types.dart b/lib/src/types.dart index b68d9c7..6e7b0e0 100644 --- a/lib/src/types.dart +++ b/lib/src/types.dart @@ -2,6 +2,7 @@ import 'dart:typed_data'; import 'package:stream_channel/stream_channel.dart'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; /// `IUserOperation` is a class representing an ERC-4337 User Operation. /// Building a UserOperation involves constructing multiple parts and merging them together. diff --git a/lib/src/utils/contracts.dart b/lib/src/utils/contracts.dart index c6e7e3c..d2a4cde 100644 --- a/lib/src/utils/contracts.dart +++ b/lib/src/utils/contracts.dart @@ -1,5 +1,6 @@ import 'dart:typed_data'; +import 'package:wallet/wallet.dart'; import 'package:web3dart/web3dart.dart'; import 'abis.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 6e14ace..d2cfbaa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,8 @@ dependencies: http: ^1.2.2 json_annotation: ^4.9.0 stream_channel: ^2.1.2 - web3dart: ^2.7.3 + web3dart: ^3.0.2 + wallet: ^0.0.18 dev_dependencies: build_runner: ^2.4.13 @@ -23,4 +24,10 @@ dev_dependencies: json_serializable: ^6.9.0 lints: ^5.0.0 test: ^1.25.9 - web3dart_builders: ^0.1.2 + web3dart_builders: + git: + url: git@github.com:AstroxNetwork/web3dart_builders.git + ref: feat/upgrade-deps + +dependency_overrides: + pointycastle: ^4.0.0 diff --git a/test/userop_test.dart b/test/userop_test.dart index 601a1a7..ab96ef2 100644 --- a/test/userop_test.dart +++ b/test/userop_test.dart @@ -1,5 +1,6 @@ import 'package:test/test.dart'; import 'package:userop/userop.dart'; +import 'package:wallet/wallet.dart'; void main() { final mockValue = EthereumAddress.fromHex(Addresses.AddressZero); From 0fac08e1fbd064e834b3e4cbfc135fd4473d03da Mon Sep 17 00:00:00 2001 From: arman-garousi-bitazza Date: Sat, 21 Feb 2026 16:47:58 +0330 Subject: [PATCH 2/2] chore: bump version to 0.3.2 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d2cfbaa..603a8ac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: userop description: A lightweight Dart library for quickly and easily building ERC-4337 UserOperations. -version: 0.3.1 +version: 0.3.2 homepage: https://fuse.io/sdk repository: https://github.com/fuseio/userop.dart issue_tracker: https://github.com/fuseio/userop.dart/issues