npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wasd3rplay/aadex-contract

v1.7.0

Published

Wasd3r AA Dex smart contracts

Readme

AA DEX contract

GitHub version npm version

Smart Contracts for AA (EIP-4337) decentrelized exchange, DEX.

Install

npm add @wasd3rplay/aadex-contract

Quickstart

import {
  getDexManagerContractCtrl,
  getEthProvider,
} from "@wasd3rplay/aadex-contract";
import { Wallet } from "ethers";

const ENTRY_POINT_ADDRESS = "0x5FbDB2315678afecb367f032d93F642f64180aa3";
const DEX_MANAGER_ADDRESS = "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512";

const ethProvider = getEthProvider("http://127.0.0.1:8545/");
const signerWallet = ethProvider.loadWalletFromMnemonic(
  "announce room limb pattern dry unit scale effort smooth jazz weasel alcohol",
);

const contractCtrl = await getDexManagerContractCtrl(
  ethProvider,
  signerWallet,
  ENTRY_POINT_ADDRESS,
  DEX_MANAGER_ADDRESS,
);
const nativeTokenKey = await contractCtrl.getNativeTokenKey();
console.log("Native token (ETH) key in AA DEX:", nativeTokenKey);

Setup Dev Env

Clone repository

git clone [email protected]:WASD3Rplay/aadex-contract.git

Using VSCode

Copy the settings.json file into the vscode settings directory (.vscode).

  • On Mac

    mkdir .vscode
    cp ./dev/vscode/settings.json ./.vscode/settings.json

Prepare NodeJs

Recommend version is 18.

nvm would make this easy:

nvm use 18
node --version

Prepare .env

First, copy the dotenv file as a .env

cp dotenv .env

The dotenv has already configs for local dev environment.

Please change the file to the appropriate environment before run commands below.

e.g. for Ethereum Sepolia testnet:

NODE_CHAIN_RPC_URL="https://sepolia.infura.io/v3/<api_key>"
NODE_ENTRY_POINT_ADDRESS="<contract_address_after_run_deploy-contracts>"
NODE_DEX_MANAGER_ADDRESS="<contract_address_after_run_deploy-contracts>"
NODE_SIGNER_SECRET="<signer_private_key_to_own_contracts>"

# Token contract addresses
NODE_TOKEN_CONTRACT_ADDRESS_USDT="<contract_address_after_run_deploy-sample-usdt>"
NODE_TOKEN_CONTRACT_ADDRESS_WETH="<contract_address_after_run_deploy-sample-weth>"

Commands

Compile smart contract

npm run compile

Clean compiled objects

npm run clean

Run local EVM node

npx hardhat node

Deploy contracts

npm run deploy-aadex

Before run this command, a EVM node should be ready.

Deploy sample ERC20 contract

Before run the below NPM command, the EntryPoint and DexManager contracts should be deployed and set those contract addresses in the .env file.

NODE_ENTRY_POINT_ADDRESS="<contract_address_after_run_deploy-contracts>"
NODE_DEX_MANAGER_ADDRESS="<contract_address_after_run_deploy-contracts>"
npm run deploy-sample-usdt
# or
npm run deploy-sample-weth

Deposit native token (ETH) in AA Dex

npm run deposit-native

Before run this command, the EntryPoint and DexManager contracts should be deployed and set those contract addresses in the .env file.

NODE_ENTRY_POINT_ADDRESS="<contract_address_after_run_deploy-contracts>"
NODE_DEX_MANAGER_ADDRESS="<contract_address_after_run_deploy-contracts>"

Deposit sample ERC20 token in AA Dex

npm run deposit-sample-usdt

Before run this command, the sample USDT contract should be deployed and set the contract address in the .env file.

NODE_TOKEN_CONTRACT_ADDRESS_USDT="<contract_address_after_run_deploy-sample-usdt>"

Swap native token and USDT in AA Dex

npm run swap-sample-native-usdt

Before run this command, the EntryPoint, DexManager, and Erc20USDT contracts should be deployed and set those contract address in the .env file.

NODE_ENTRY_POINT_ADDRESS="<contract_address_after_run_deploy-contracts>"
NODE_DEX_MANAGER_ADDRESS="<contract_address_after_run_deploy-contracts>"

# Token contract addresses
NODE_TOKEN_CONTRACT_ADDRESS_USDT="<contract_address_after_run_deploy-sample-usdt>"

Additionally, Alice and Bill, who are pretended customers of AA Dex, account secrets are needed in the .env file.

# AA Dex accounts
NODE_DEX_ACCOUNT_SECRET_ALICE="0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
NODE_DEX_ACCOUNT_SECRET_BILL="0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"

You can use the above data in any test network.

But, do NOT use this data in any mainnet network because these data is provided by hardhat dev node with npx hardhat node.