Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chain-end

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chain-end

Programmatic pre-compiled Truffle contract deployment, and soon, more

  • 0.5.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

chain-end

For programmatically deploying an arbitrary number of pre-compiled smart contracts, and, Soon:tm:, interacting with them in all sorts of interesting ways.

usage

The imported package contains three modules:

  • the contracts object, which contains the JSON of the default contracts
  • the Deployer class
    • instantiate a deployer using Deployer(web3Provider, accountAddress, gasLimit)
      • for use with MetaMask, use Deployer(web3Provider, accountAddress) to let MetaMask handle transaction gas
    • add a contract type to deploy instances of it using deployer.addContract(compiledJSON)
      • compiledJSON must be an undeployed, compiled Truffle artifact, i.e. the output of truffle compile
    • deploy and access a deployed contract instance using const instance = deployer.deploy(contractName, constructorParameters)
      • contractName must be a key from contracts or the name of a contract added using addContract
    • consult src/deployer.js for additional methods you may want to use
  • the deploy function, which exposes the internal API of Deployer for stateless deployment
    • deploy directly using: deploy(contractJSON, constructorParams, web3Provider, web3Account, gasLimit)
    • gasLimit is optional
  • the getInstance function, which retrieves a deployed contract given its artifact, its deployed address, a provider, and (optionally) a sender account
  • the callInstance function, which calls a specified function from a given TruffleContract instance and returns the result

Keywords

FAQs

Package last updated on 31 Aug 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc