Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@digicat/ethereum-contract-watcher
Advanced tools
Observes contracts on a web3.js-compatible Ethereum network, providing callbacks for when events are emitted
This package can observe contracts on a web3.js-compatible Ethereum network, providing callbacks for when events are emitted. Requires Node.js 8.6 or newer.
const ContractWatcher = require('@digicat/ethereum-contract-watcher')
const watcher = new ContractWatcher({
ethereumNode: 'http://localhost:8545',
onError (err, token) {
// Called when an error occurred. Expected to be synchronous.
},
onEvent (event, token) {
// Called when an event occurs for a contract that's being watched.
//
// Can be asynchronous (if you return a promise). Won't interleave with
// other events.
//
// The `event` object comes directly from Web3.
// See <https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-events>.
},
wrapWeb3Error (err) {
// Allows for underlying Web3 errors to be wrapped in another Error class.
// By default returns the error as-is.
return err
}
})
// Start watching a new contract. The `token` is provided in callbacks as-is.
watcher.add({
// ABI array of the contract (required).
abi: […],
// Contract address (required, no default value).
address: '0xef3b47f7e4865c72565f448cc162945ea5bcdc1e'
// The block from which events should be observed. Defaults to 'latest'.
fromBlock: 'latest',
token: {
an: {
arbitrary: 'object'
}s
}
})
// Stop watchers all contracts.
watcher.stop()
FAQs
Observes contracts on a web3.js-compatible Ethereum network, providing callbacks for when events are emitted
The npm package @digicat/ethereum-contract-watcher receives a total of 0 weekly downloads. As such, @digicat/ethereum-contract-watcher popularity was classified as not popular.
We found that @digicat/ethereum-contract-watcher 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.