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

@sonic-agent-kit/agent-evm-tools

v1.0.4

Published

A production-grade library for agentic automation with persistent task storage, RabbitMQ queuing scheduling, and worker support.

Downloads

5

Readme

import { ethers, Provider } from "ethers";
import { DexSwapContract } from "./src/DexSwapContract";
import { AssetTransferContract } from "./src/AssetTransferContract";
import { TokenFactoryContract } from "./src/TokenFactoryContract";

// Connect to your network (example with a JSON-RPC provider)
const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545/");


// Or if using a signer (for transactions):
// Create a signer from a private key
const privateKey1 = "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"; // Replace with your actual private key
const signer = new ethers.Wallet(privateKey1, provider);

// Instantiate your contracts with deployed addresses:
const assetTransferAddress = "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512";
const tokenFactoryAddress = "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0";

//const dexSwap = new DexSwapContract(dexSwapAddress, signer);
const assetTransfer = new AssetTransferContract(assetTransferAddress, signer);
const tokenFactory = new TokenFactoryContract(tokenFactoryAddress, signer);

// Now you can call methods like:
async function example() {
  // Create a new fungible token:
  const txCreate = await tokenFactory.createFungibleToken("NewToken", "NTK", ethers.parseEther("1000").toString());
  const receipt = await txCreate.wait();
  
  // Get the token creation event specifically
  const tokenCreatedFilter = tokenFactory.contract.filters.FungibleTokenCreated();
  const events = await tokenFactory.contract.queryFilter(
    tokenCreatedFilter, 
    receipt.blockNumber, 
    receipt.blockNumber
  );

  // Extract token address and creator from the event
  if ('args' in events[0]) {
    const tokenAddress = events[0].args[0];
    const creator = events[0].args[1];
    
    // Save the important event details
    const tokenCreationDetails = {
      tokenAddress,
      creator,
      transactionHash: events[0].transactionHash,
      blockNumber: events[0].blockNumber
    };
    
    console.log("Token Creation Details:", tokenCreationDetails);
  } else {
    // Handle case where event is a Log rather than EventLog
    const tokenCreationDetails = {
      transactionHash: events[0].transactionHash,
      blockNumber: events[0].blockNumber,
      topics: events[0].topics // Topics contain the indexed parameters
    };
    
    console.log("Token Creation Details:", tokenCreationDetails);
  }

  // Create a new non-fungible token:
  const txCreateNFT = await tokenFactory.createNonFungibleToken("NewNFT", "NFTK");
  const receiptNFT = await txCreateNFT.wait();
  console.log("NFT Creation Transaction:", receiptNFT);

  // Transfer ETH to a recipient:
  const txTransferETH = await assetTransfer.transferETH("0x70997970C51812dc3A010C7d01b50e0d17dc79C8", ethers.parseEther("1").toString());
  const receiptETH = await txTransferETH.wait();
  console.log("ETH Transfer Transaction:", receiptETH);

  // Transfer ERC20 tokens to a recipient:
//   const txTransferERC20 = await assetTransfer.transferERC20("0xTokenAddress", "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", ethers.parseEther("100").toString());
//   console.log("ERC20 Transfer Transaction:", txTransferERC20.hash);

//   // Transfer NFT to a recipient:
//   const txTransferNFT = await assetTransfer.transferNFT("0xNFTAddress", "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", 1);
//   console.log("NFT Transfer Transaction:", txTransferNFT.hash);
}

example().catch(console.error);