Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
We recommend switching to Node.js version 12.0.1 to make sure common crypto dependencies work. Execute nvm use, if you have Node Version Manager.
npm install --save abi-tool
Install ethers、axios too if you haven't already.
The abi jsonof supporting contract acquisition from some blockchain browsers is that the contract has been open sourced, now support eth、bsc、polygon
for examble:
const {AbiTool, CHAIN_APIS} = require('../abi-tool');
let data = await AbiTool.getContractAbi(
"0xdac17f958d2ee523a2206206994597c13d831ec7 ",
CHAIN_APIS.ETH
)
console.log(data)
If you know the abi of the contract, you can import private keys in batches and execute a certain method of the same contract at the same time, this does not limit the network
const {AbiTool, CHAIN_APIS} = require('../abi-tool');
const pks = [
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
]
const abi = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
const chainRpc = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
const chainId = "xxxxxx"
const contractAddress = "xxxxxxxxxxxxxxxxxxxxx"
let abiTool = new AbiTool(chainRpc , chainId )
//start listen event,this function emit name `batchCallContract`
abiTool.emitter.on("batchCallContract", function (arg) {
console.log("arg", arg)
})
await abiTool.batchCallContract(
contractAddress,
abi,
pks,
methodName,
args,
{
gasPrice:"xxxxxxxxxx",
gasPrice:"xxxxxxxxxx"
}
)
FAQs
Get the contract's abi through the blockchain browser
The npm package abi-tool receives a total of 1 weekly downloads. As such, abi-tool popularity was classified as not popular.
We found that abi-tool 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.