Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Releases: stackup-wallet/userop.js

v0.3.3

29 Aug 04:21
ef1a5fc
Compare
Choose a tag to compare

What's Changed

  • Remove redundant estimateCreationGas from gasLimit middleware by @hazim-j in #102

Full Changelog: v0.3.2...v0.3.3

v0.3.2

03 Aug 03:03
2018000
Compare
Choose a tag to compare

Release notes

This patch release adds 2 changes:

  1. Fix verificationGasLimit typo in eth_estimateUserOperationGas (verificationGas is still used as fallback to prevent breaking changes).
  2. Add the ability to override the salt in preset builders so that a single signer can control multiple contract accounts.

Salt override

Below is an example for how to override the salt to generate new contract addresses using the same signing key.

export default async function main() {
  const acc = await Presets.Builder.SimpleAccount.init(
    new ethers.Wallet(SIGNING_KEY),
    RPC_URL,
    { salt: NUMBER }
  );
  const address = acc.getSender();

  console.log(`Address: ${address}`);
}

What's Changed

Full Changelog: v0.3.0...v0.3.2

v0.3.0

07 Jun 14:18
148b5ab
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.2.0...v0.3.0

v0.2.0

05 May 04:57
5a895b6
Compare
Choose a tag to compare

Release notes

This release updates the SimpleAccount preset to accept an ethers.Signer type rather then a raw private key string. This enables better integration with other tools that don't expose private keys.

Breaking changes

If you're using the SimpleAccount preset, you'll need to make the following changes:

const simpleAccount = await Presets.Builder.SimpleAccount.init(
--  config.signingKey,
++  signer,
  config.rpcUrl,
  config.entryPoint,
  config.simpleAccountFactory
);

What's Changed

  • Change to require a Signer so that it can be used with external wallets such as metamask by @serinuntius in #25
  • Bump minor version to 0.2 by @hazim-j in #27

New Contributors

Full Changelog: v0.1.6...v0.2.0

v0.1.6

05 May 02:30
6ea20a7
Compare
Choose a tag to compare

Release notes

The initial release of userop.js.


What's Changed

New Contributors

Full Changelog: https://github.com/stackup-wallet/userop.js/commits/v0.1.6