Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@aa-sdk/ethers
Advanced tools
@aa-sdk/ethers
This package contains EthersProviderAdapter
and AccountSigner
, respective extensions of the JsonRpcProvider
and Signer
classes defined in ethers.js
external library.
If you currently rely ethers.js
for web3 development, you can use these ethers.js
-compatible JsonRpcProvider
and Signer
to integrate Account Abstraction into your dApp. You may also find the util
methods helpful.
This repo is community maintained and we welcome contributions!
If you are already using the @aa-sdk/core
package, you can simply install this package and start using the EthersProviderAdapter
and AccountSigner
. If you are not using @aa-sdk/core
, you can install it and follow the instructions in the "Getting started" docs to get started.
yarn add @aa-sdk/ethers
npm i -s @aa-sdk/ethers
pnpm i @aa-sdk/ethers
You can create a provider and connect it to a signer account like so:
import {
LightSmartContractAccount,
getDefaultLightAccountFactoryAddress,
} from "@alchemy/aa-accounts";
import { EthersProviderAdapter } from "@aa-sdk/ethers";
import { LocalAccountSigner, SmartAccountSigner } from "@aa-sdk/core";
import { Alchemy, Network } from "alchemy-sdk";
import { polygonMumbai } from "@aa-sdk/core";
const chain = polygonMumbai;
// 1. Create a provider using EthersProviderAdapter
const alchemy = new Alchemy({
apiKey: process.env.API_KEY!,
network: Network.MATIC_MUMBAI,
});
const ethersProvider = await alchemy.config.getProvider();
const provider = EthersProviderAdapter.fromEthersProvider(ethersProvider);
const signer: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner(
process.env.YOUR_OWNER_MNEMONIC!
);
// 2. Connect the provider to the smart account signer
export const signer = provider.connectToAccount(
(rpcClient) =>
new LightSmartContractAccount({
chain,
factoryAddress: getDefaultLightAccountFactoryAddress(chain),
rpcClient,
signer,
})
);
FAQs
Ethers.js wrapper for @aa-sdk/core
We found that @aa-sdk/ethers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.