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

dd-tool-package

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dd-tool-package

Uses Ganache to Fork the chain and run operations

  • 1.5.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

DD Tool Package

This is the TS CLI implementation of a tool that would allow to replicate a sequence of TXs

Why

To share DD (e.g. How many emissions this week?)

To share POCs (e.g. How do I repro a potential attack?)

Internals

  • Usual TS for Code
  • Ganache for Forking and Execution
  • Ethers for Encoding and Decoding (human readable side)

How to use

Check /task/steps.json

This is an example of how to get started

The globalLoop would receive a DDSequence to execute

Input and Output mappings are available to create variables

Variables

Variables can be concrete or a stateMapping

Concrete is a real value (e.g your address)

StateMapping is a mapping to the GlobalState

With this system you can store intermediary results or pass hardcoded values

Cheat-like basic implementation

Ganache offers Storage Rewrite and ETH Minting

Some global options in AdditionalSettings allow to use them (MOSTLY TODO)

Architecture

theGlobalLoop is the entire global logic

executeOne is the function that uses ganache, hidden away as it's a low level implementation

Ganache expects ExecutableContracts these are the low level version used internally and returns string/bytes as responses

This means the "Low level" / execution is at the lowest level

The interpretation happens in the loop

Study Guide

Understand theLoop and the types

Once you read these, everything should be more clear

Contributing

Looking for help with tests

Help in writing the ERC20 Cheats

See TODO for more or reach out on twitter

FAQs

Package last updated on 28 Nov 2023

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