Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@ton/emulator
Advanced tools
Emulation toolkit for TON Smart Contracts
yarn add ton-emulator @ton/core ton-crypto
import { ContractSystem } from 'ton-emulator';
// Contract System is a virtual environment that emulates the TON blockchain
const system = await ContractSystem.create();
// Treasure is a contract that has 1m of TONs and is a handy entry point for your smart contracts
let treasure = await system.treasure('my-treasure');
// Track contract transactions and events
let tracker = system.track(treasure.address);
// Logger to collect VM logs from a contract
let logger = system.log(treasure.address);
// Create a random unknown address that would be treated as unititialized contract
let unknownAddress = testAddress('some-unknown-seed'); // This seed is used to generate deterministic address
// Send an empty message to the unknown address
await treasure.send({
to: unknownAddress,
bounce: true,
});
// Run a block
let transactions = await system.run();
console.warn(inspect(transactions, false, 10000));
// Open a contract
let wallet = system.open(WalletContractV4.create({ workchain: 0, publicKey: <some-test-key> }));
// Show contract logs
console.warn(logger.collect());
// Test events and transactions
expect(tracker.collect()).toMatchSnapshot();
This library is developed and maintained by the Whales Corp..
MIT
FAQs
Emulation toolkit for TON Smart Contracts
We found that @ton/emulator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.