v0.3.0
Release notes
TL;DR:
- Simplify interface for Preset builders and client.
- Add Preset for ZeroDev Kernel.
- Add
BundlerJsonRpcProvider
module. - Add
Constants
module.
Breaking changes
v0.3.0
requires minor updates to how we initialise presets and clients
Presets
If you're using the SimpleAccount preset, you'll need to make the following changes. Common entities such as entryPoint
and simpleAccountFactory
addresses have been moved to a Constants
module.
const simpleAccount = await Presets.Builder.SimpleAccount.init(
signer,
config.rpcUrl,
-- config.entryPoint,
-- config.simpleAccountFactory
);
Presets now also have an optional opts
argument for the init
method. This lets you still use non-canonical values and define a paymaster middleware.
interface IPresetBuilderOpts {
entryPoint?: string;
factory?: string;
paymasterMiddleware?: UserOperationMiddlewareFn;
overrideBundlerRpc?: string;
}
For example, if you want to include a paymaster middleware:
const simpleAccount = await Presets.Builder.SimpleAccount.init(
signer,
config.rpcUrl,
{ paymasterMiddleware }
);
Client
Similarly with clients, the entryPoint is not required when calling init
. It defaults to the canonical entryPoint address and can be overridden in an optional opts
argument.
const client = await Client.init(
config.rpcUrl,
-- config.entryPoint
);
An optional opts
argument can also be passed:
interface IClientOpts {
entryPoint?: string;
overrideBundlerRpc?: string;
}
For example, to override the bundler RPC:
const client = await Client.init(
config.rpcUrl,
{ overrideBundlerRpc }
);
Running into issues?
Check out the resources below:
What's Changed
- Add v0.3.0 updates by @hazim-j in #46
- Bump @typechain/ethers-v5 from 10.2.0 to 10.2.1 by @dependabot in #29
- Bump rimraf from 4.4.1 to 5.0.1 by @dependabot in #37
- Rename Kernel preset and add exec functions by @hazim-j in #49
- Bump eslint from 8.38.0 to 8.41.0 by @dependabot in #40
- Bump typechain from 8.1.1 to 8.2.0 by @dependabot in #41
- Bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.59.8 by @dependabot in #42
- Bump @faker-js/faker from 7.6.0 to 8.0.2 by @dependabot in #44
- Bump typescript from 5.0.4 to 5.1.3 by @dependabot in #47
- Export Constants by @hazim-j in #54
- Bump prettier from 2.8.7 to 2.8.8 by @dependabot in #18
- Bump @types/jest from 29.5.0 to 29.5.2 by @dependabot in #45
- Bump @typescript-eslint/parser from 5.57.1 to 5.59.9 by @dependabot in #50
- Use deterministic Kernel V2 addresses by @hazim-j in #55
- Bump @typescript-eslint/eslint-plugin from 5.59.8 to 5.59.9 by @dependabot in #51
- Bump @typechain/ethers-v5 from 10.2.1 to 11.0.0 by @dependabot in #52
- Bump eslint from 8.41.0 to 8.42.0 by @dependabot in #53
- Remove promiseOrValue from generated types by @hazim-j in #56
- Bump version to 0.3 by @hazim-j in #57
New Contributors
- @dependabot made their first contribution in #29
Full Changelog: v0.2.0...v0.3.0