
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
@ethernauta/erc
Advanced tools
[](https://deno.bundlejs.com/?q=@ethernauta/erc&treeshake=[*])
ERC method bindings ready to be used to read or write the blockchain. Each method is generated from the standard's reference ABI and is either a Callable<T> (view / pure) or a Signable<Bytes> (state-changing).
This module aims to be an un-opinionated representation of the defined:
burnable, capped, flash-mint, mintable, pausable, permit, votes, wrapperburnable, pausable, permit, royalty, votesPlease, if this is the case, ask for it in an issue.
You can generate your own methods (ready to be used) if you provide a valid ABI in .json format. Check the CLI package.
import { transfer } from "@ethernauta/erc/20"
import { eth_sendRawTransaction } from "@ethernauta/eth"
import { number_to_hex } from "@ethernauta/utils"
import { signer, writer, SEPOLIA_CHAIN_ID } from "./resolvers"
const TOKEN_ADDRESS = "0x..."
const signed = await transfer([
"0x636c0fcd6da2207abfa80427b556695a4ad0af94",
number_to_hex(1),
])(signer({ chain_id: SEPOLIA_CHAIN_ID, to: TOKEN_ADDRESS }))
const hash = await eth_sendRawTransaction([signed])(
writer({ chain_id: SEPOLIA_CHAIN_ID }),
)
import { balanceOf } from "@ethernauta/erc/20"
import { contract, SEPOLIA_CHAIN_ID } from "./contract"
const TOKEN_ADDRESS = "0x..."
const balance = await balanceOf({ owner: account })(
contract({ chain_id: SEPOLIA_CHAIN_ID, to: TOKEN_ADDRESS }),
)
import { approve } from "@ethernauta/erc/721"
import { eth_sendRawTransaction } from "@ethernauta/eth"
import { signer, writer, SEPOLIA_CHAIN_ID } from "./resolvers"
const NFT_ADDRESS = "0x..."
const signed = await approve([
"0x636c0fcd6da2207abfa80427b556695a4ad0af94",
"1",
])(signer({ chain_id: SEPOLIA_CHAIN_ID, to: NFT_ADDRESS }))
const hash = await eth_sendRawTransaction([signed])(
writer({ chain_id: SEPOLIA_CHAIN_ID }),
)
import { supportsInterface } from "@ethernauta/erc/165"
import { contract, SEPOLIA_CHAIN_ID } from "./contract"
const ERC721_INTERFACE_ID = "0x80ac58cd"
const supported = await supportsInterface({
interfaceId: ERC721_INTERFACE_ID,
})(contract({ chain_id: SEPOLIA_CHAIN_ID, to: NFT_ADDRESS }))
FAQs
ERC method bindings (20, 721, 1155, 4626, 5267, …) as importable subpaths for Ethernauta.
The npm package @ethernauta/erc receives a total of 402 weekly downloads. As such, @ethernauta/erc popularity was classified as not popular.
We found that @ethernauta/erc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.