Client constructor
Client(
- String rpcUrl, {
- IClientOpts? opts,
Constructor for Client
.
Initializes the Web3Client
and other necessary properties.
Requires an RPC bundler url for connection.
Implementation
Client(
String rpcUrl, {
IClientOpts? opts,
}) : web3client = Web3Client.custom(
BundlerJsonRpcProvider(
rpcUrl,
http.Client(),
).setBundlerRpc(
opts?.overrideBundlerRpc,
),
socketConnector: opts?.socketConnector,
),
waitTimeoutMs = 30000,
waitIntervalMs = 5000 {
entryPoint = EntryPoint(
client: web3client,
address: EthereumAddress.fromHex(ERC4337.ENTRY_POINT),
);
}