
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@delvtech/evm-client
Advanced tools
Useful EVM client abstractions for TypeScript projects that want to remain web3 library agnostic.
Useful EVM client abstractions for TypeScript projects that want to remain web3 library agnostic.
import {
CachedReadWriteContract,
ContractReadOptions,
} from '@delvtech/evm-client';
import erc20Abi from './abis/erc20Abi.json';
type CachedErc20Contract = CachedReadWriteContract<typeof erc20Abi>;
async function approve(
contract: CachedErc20Contract,
spender: `0x${string}`,
amount: bigint,
) {
const hash = await contract.write('approve', { spender, amount });
this.contract.deleteRead('allowance', {
owner: await contract.getSignerAddress(),
spender,
});
return hash;
}
This project contains types that can be used in TypeScript projects that need to interact with contracts in a type-safe way based on ABIs. It allows your project to focus on core contract logic and remain flexible in it's implementation. To aid in implementation, this project provides:
The contract abstraction lets you write type-safe contract interactions that can be implemented in multiple web3 libraries and even multiple persistence layers. The API is meant to be easy to both read and write.
ReadContract: A basic contract that
can be used to fetch data, but can't submit transactions.ReadWriteContract: An extended
ReadContract that has a signer attached to it and can be used to submit
transactions.CachedReadContract: An
extended ReadContract that will cache reads and event queries based on
arguments with a few additional methods for interacting with the cache.CachedReadWriteContract: An
extended CachedReadContract that has a signer attached to it and can be used
to submit transactions.objectToArray: A function
that takes an object of inputs (function and event arguments) and converts it
into an array, ensuring parameters are properly ordered and the correct number
of parameters are present.
arrayToObject: The opposite
of objectToArray. A function to transform contract input and output arrays
into objects.
arrayToFriendly: A function
to transform contract output arrays into "Friendly" types. The friendly type
of an output array depends on the number of output parameters:
undefinedcreateCachedReadContract:
A factory that turns a ReadContract into a CachedReadContract.createCachedReadWriteContract:
A factory that turns a ReadWriteContract into a CachedReadWriteContract.ReadContractStub: A stub of
a ReadContract for use in tests.ReadWriteContractStub:
A stub of a ReadWriteContract for use in tests.The Network abstraction provides a small interface for fetching vital network
information like blocks and transactions.
NetworkStub: A stub of a Network
for use in tests.A simple cache abstraction providing a minimal interface for facilitating contract caching.
createSimpleCacheKey:
Creates a consistent serializable cache key from basic types.createLruSimpleCache:
Creates a SimpleCache instance using an LRU cache.FAQs
> [!CAUTION] > > **This project has been deprecated in favor of > [Drift](https://github.com/delvtech/drift).**
The npm package @delvtech/evm-client receives a total of 223 weekly downloads. As such, @delvtech/evm-client popularity was classified as not popular.
We found that @delvtech/evm-client demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.