
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
For programmatically deploying an arbitrary number of pre-compiled Solidity smart contracts.
You can also clone the repo to access a clunky command line utility for, given .sol
source files, finding dependencies of smart contracts and joining them into a single source file for easy Etherscan verification.
Install using npm install chain-end
. Command line utilities require Python.
The imported package contains the following relevant properties:
contracts
object, which contains the JSON (truffle compile
output) of the default contractsDeployer
class
Deployer(web3Provider, accountAddress, gasLimit)
Deployer(web3Provider, accountAddress)
to let MetaMask handle transaction gasdeployer.addContract(compiledJSON)
compiledJSON
must be an undeployed, compiled Truffle artifact, i.e. the output of truffle compile
const instance = deployer.deploy(contractName, constructorParameters)
contracts
or the name of a contract added using addContract
src/web3/deployer.js
for additional methods you may want to usedeploy
function, which exposes the internal API of Deployer
for stateless deployment
deploy(contractJSON, constructorParams, web3Provider, web3Account, gasLimit)
gasLimit
is optionalgetInstance
function, which retrieves a deployed contract given its artifact, its deployed address, a provider, and (optionally) a sender accountcallInstance
function, which calls a specified function from a given TruffleContract instance and returns the resultNote: GitHub repository only, also literally the hackiest thing you've ever seen.
All scripts must be run from the chain-end
project root directory.
yarn cli-setup
.sol
files in solidity/source_files/raw
raw/
raw/dependencies
raw/
will contain all OpenZeppelin contracts in the openzeppelin-contracts
folder (note the version in package.json
)yarn get-metadata
, notice the files output in solidity/metadata
yarn join-source-files -- solidity/metadata/metadataFile solidity/metadata/filepathsFile
yarn solcompile
module.exports.contracts
solidity/compiled
solidity/source_files/complete
If the metadata interests you, here is a partial example output:
{
"Address": {
"compiler": "^0.5.0",
"dependencies": [],
"name": "Address",
"type": "library"
},
"AllowanceCrowdsale": {
"compiler": "^0.5.0",
"dependencies": [
"Crowdsale",
"IERC20",
"Math",
"SafeERC20",
"SafeMath"
],
"name": "AllowanceCrowdsale",
"type": "contract"
},
...
}
MIT
FAQs
Programmatic pre-compiled Truffle contract deployment
The npm package chain-end receives a total of 1 weekly downloads. As such, chain-end popularity was classified as not popular.
We found that chain-end 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 flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.