Socket
Book a DemoInstallSign in
Socket

multi-transfer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multi-transfer

Batch estimate account balances to the one address

1.0.6
latest
npmnpm
Version published
Maintainers
1
Created
Source

Install

npm install --save multi-transfer

Usage

Native token multi transfer:

const {Mt} = require("multi-transfer")

var chainUrl = "xxxxxxxxxxxxxxxxxxxxxx"
var chainId = "xxxxxx"
var mt = new Mt(chainUrl, chainId);

var emitName = "test"
var privateKeys = ["xxxxxxxxxxxxxxxxxxxxxx"]
var receiveAddress = "xxxxxxxxxxxxxxxxxxxxx"
var transferAmount = 0

mt.emitter.on(emitName, function (arg) {
	console.log("arg", arg)
})
mt.multiCollection(emitName, privateKeys, receiveAddress, transferAmount,"",{
  transferCount:10,
  gasLimit:"xxxxxxx",
  gasPrice:"xxxxxxx"
})

ERC20 token multi transfer:

const {Mt} = require("multi-transfer")

var chainUrl = "xxxxxxxxxxxxxxxxxxxxxx"
var chainId = "xxxxxx"
var mt = new Mt(chainUrl, chainId);

var emitName = "test"
var privateKeys = ["xxxxxxxxxxxxxxxxxxxxxx"]
var receiveAddress = "xxxxxxxxxxxxxxxxxxxxx"
var transferAmount = 0
var tokenAddress = "xxxxxxxxxxxxxxxxxxxx"

mt.emitter.on(emitName, function (arg) {
	console.log("arg", arg)
})
mt.multiCollection(emitName,privateKeys, receiveAddress, transferAmount, tokenAddress,{
  transferCount:10,
  gasLimit:"xxxxxxx",
  gasPrice:"xxxxxxx"
})

Note

If you want to get the callback data,you must enable listening for events before calling the method.This library uses the ethers library to interact with the chain, please pass in the RPC url and chain id when instantiating.

Keywords

Multi

FAQs

Package last updated on 01 Mar 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.