
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
The VDS JavaScript library for Smart Contract development.
npm install vdsjs
This is a sample code snippet that transfer ERC20 tokens:
import { VdsRPC } from "vdsjs"
const repoData = require("./solar.json")
const vds = new Vds("http://vds:test@localhost:3889", repoData)
const myToken = vds.contract(
"zeppelin-solidity/contracts/token/CappedToken.sol",
)
async function transfer(fromAddr, toAddr, amount) {
const tx = await myToken.send("transfer", [toAddr, amount], {
senderAddress: fromAddr,
})
console.log("transfer tx:", tx.txid)
console.log(tx)
await tx.confirm(3)
console.log("transfer confirmed")
}
This is a sample code snippet that sample contract:
const {Contract, VdsRPC} = require("vdsjs")
const rpc = new VdsRPC("/")
const contractInfo = require("./MilFold.json");
const milFold = new Contract(rpc, contractInfo);
//单参数
function getHistoryRoundInfo(args) {
let callResult = milFold.call("getHistoryRoundInfo", args);//返回16进制数据
callResult.then(data => {
console.log(JSON.stringify(data));
console.log(JSON.stringify(data.outputs));
});
let funcArgs = [];
funcArgs.push(args)
let callParseData = milFold.callFunc("getHistoryRoundInfo", funcArgs);//返回10进制数据
callParseData.then(data => {
console.log(JSON.stringify(data));
});
}
//多参数
function getPlayerRoundNums(...args) {
let callArgs = [];
callArgs.push(args[0][0])
callArgs.push(args[1][0])
let callResult = milFold.call("getPlayerRoundNums", callArgs);
callResult.then(data => {
console.log(JSON.stringify(data));
console.log(JSON.stringify(data.outputs));
});
let funcArgs = [];
funcArgs.push(args[0])
funcArgs.push(args[1])
let callParseData = milFold.callFunc("getPlayerRoundNums", funcArgs);
callParseData.then(data => {
console.log(JSON.stringify(data));
});
}
let chaindemo = {
getHistoryRoundInfo: function (args) {
getHistoryRoundInfo(args);
},
getPlayerRoundNums: function (...args) {
getPlayerRoundNums(...args);
}
};
export default chaindemo;
FAQs
The VDS JavaScript library for Smart Contract development.
We found that vdsjs 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 CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.