Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@metis.io/core-utils
Advanced tools
[![codecov](https://codecov.io/gh/ethereum-optimism/optimism/branch/master/graph/badge.svg?token=0VTG7PG7YR&flag=core-utils)](https://codecov.io/gh/ethereum-optimism/optimism)
@eth-optimism/core-utils
contains the Optimistic Virtual Machine core utilities.
After cloning and switching to the repository, install dependencies:
$ yarn
Use the following commands to build, use, test, and lint:
$ yarn build
$ yarn start
$ yarn test
$ yarn lint
TxGasLimit
can be used to encode
and decode
the L2 Gas Limit
locally.
import { TxGasLimit } from '@eth-optimism/core-utils'
import { JsonRpcProvider } from 'ethers'
const L2Provider = new JsonRpcProvider('https://mainnet.optimism.io')
const L1Provider = new JsonRpcProvider('http://127.0.0.1:8545')
const l2GasLimit = await L2Provider.send('eth_estimateExecutionGas', [tx])
const l1GasPrice = await L1Provider.getGasPrice()
const encoded = TxGasLimit.encode({
data: '0x',
l1GasPrice,
l2GasLimit,
l2GasPrice: 10000000,
})
const decoded = TxGasLimit.decode(encoded)
assert(decoded.eq(gasLimit))
const estimate = await L2Provider.estimateGas()
assert(estimate.eq(encoded))
FAQs
[![codecov](https://codecov.io/gh/ethereum-optimism/optimism/branch/master/graph/badge.svg?token=0VTG7PG7YR&flag=core-utils)](https://codecov.io/gh/ethereum-optimism/optimism)
We found that @metis.io/core-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.