
Research
Malicious Go “crypto” Module Steals Passwords and Deploys Rekoobe Backdoor
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.
web3-eth-contract
Advanced tools
This is a sub-package of web3.js.
web3-eth-contract contains the contract package used in web3-eth.
You can install the package either using NPM or using Yarn
npm install web3-eth-contract
yarn add web3-eth-contract
You can initialize the typesafe Contract API instance with the following.
import { Contract } from 'web3-eth-contract';
const abi = [...] as const;
const contract = new Contract(abi);
web3.eth.Contract API in normal usage.as const is necessary to have fully type-safe interface for the contract.as const in your TS project.We have tested the Typescript interface support for the ABIs compiled with solidity version v0.4.x and above. If you face any issue regarding the contract typing, please create an issue to report to us.
The Typescript support for fixed length array types are supported up 30 elements. See more details here. This limitation is only to provide more performant developer experience in IDEs. In future we may come up with a workaround to avoid this limitation. If you have any idea feel free to share.
| Script | Description |
|---|---|
| clean | Uses rimraf to remove dist/ |
| build | Uses tsc to build package and dependent packages |
| lint | Uses eslint to lint package |
| lint:fix | Uses eslint to check and fix any warnings |
| format | Uses prettier to format the code |
| test | Uses jest to run unit tests |
| test:integration | Uses jest to run tests under /test/integration |
| test:unit | Uses jest to run tests under /test/unit |
The ethers.js library is a complete and compact library for interacting with the Ethereum blockchain and its ecosystem. It provides similar functionalities to web3-eth-contract, such as deploying contracts, calling contract methods, and listening to events. Ethers.js is known for its simplicity and ease of use.
Truffle Contract is a part of the Truffle Suite and provides a better abstraction for interacting with Ethereum smart contracts. It offers similar functionalities to web3-eth-contract, including contract deployment, method calls, and event listening. Truffle Contract is tightly integrated with the Truffle framework, making it a good choice for developers using Truffle for their Ethereum development.
Embark is a framework for developing and deploying decentralized applications (dApps) that integrates with Ethereum smart contracts. It provides functionalities similar to web3-eth-contract, such as contract deployment, method calls, and event listening. Embark is known for its powerful features and ease of use, especially for building complex dApps.
FAQs
Web3 module to interact with Ethereum smart contracts.
The npm package web3-eth-contract receives a total of 362,476 weekly downloads. As such, web3-eth-contract popularity was classified as popular.
We found that web3-eth-contract demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.

Security News
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.