npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@leapdao/split-tx

v1.0.1

Published

Lightweight (1.2Kb zipped) CLI to encode/decode `splitERC20` call of [PaymentSplitter contract](https://github.com/leapdao/leap-contracts/blob/master/contracts/misc/PaymentSplitter.sol).

Downloads

11

Readme

Splitter contract message data encoder/decoder

Lightweight (1.2Kb zipped) CLI to encode/decode splitERC20 call of PaymentSplitter contract.

Usage

Decode

npx @leapdao/split-tx decode <message data>

Encode

npx @leapdao/split-tx encode <address 1> <value 1> [<address 2> <value 2> ...] [<token address>]

DAI split (default)

Example:


 $ npx @leapdao/split-tx encode 0x0b03dd1c2D88c9Af8caF287c3063776B7d07D441 100 0x33f9Cd1cCC15211B3468ff52b2052b5f7D6C5D86 200 0x0e9cc8982a24472364F74E9290D337d1C62D9E63 125.5

Output:

Token to split: 0x6b175474e89094c44da98b954eedeac495271d0f
split:
	100.0 → 0x0b03dd1c2D88c9Af8caF287c3063776B7d07D441
	200.0 → 0x33f9Cd1cCC15211B3468ff52b2052b5f7D6C5D86
	125.5 → 0x0e9cc8982a24472364F74E9290D337d1C62D9E63

Total: 425.5

Message data for splitERC20 call:
0x5669312a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000b03dd1c2d88c9af8caf287c3063776b7d07d44100000000000000000000000033f9cd1ccc15211b3468ff52b2052b5f7d6c5d860000000000000000000000000e9cc8982a24472364f74e9290d337d1c62d9e6300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000ad78ebc5ac6200000000000000000000000000000000000000000000000000006cda991128f860000

Custom token split

$ npx @leapdao/split-tx encode 0x0b03dd1c2D88c9Af8caF287c3063776B7d07D441 100 0x33f9Cd1cCC15211B3468ff52b2052b5f7D6C5D86 200 0x0e9cc8982a24472364F74E9290D337d1C62D9E63 125.5 0x78230e69d6e6449db1e11904e0bd81c018454d7a

Output:

Token to split: 0x78230e69d6e6449db1e11904e0bd81c018454d7a
split:
	100.0 → 0x0b03dd1c2D88c9Af8caF287c3063776B7d07D441
	200.0 → 0x33f9Cd1cCC15211B3468ff52b2052b5f7D6C5D86
	125.5 → 0x0e9cc8982a24472364F74E9290D337d1C62D9E63

Total: 425.5

Message data for splitERC20 call:
0x5669312a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000078230e69d6e6449db1e11904e0bd81c018454d7a00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000b03dd1c2d88c9af8caf287c3063776b7d07d44100000000000000000000000033f9cd1ccc15211b3468ff52b2052b5f7d6c5d860000000000000000000000000e9cc8982a24472364f74e9290d337d1c62d9e6300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000ad78ebc5ac6200000000000000000000000000000000000000000000000000006cda991128f860000