Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@tact-lang/emulator
Advanced tools
Emulation toolkit for TON Smart Contracts
yarn add @tact-lang/emulator ton-core ton-crypto
import { ContractSystem, randomAddress } from '@tact-lang/emulator';
import { WalletContractV4 } from 'ton';
// 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');
// Update verbosity
system.verbosity = Verbosity.DEBUG; // Global parameter
system.contract(treasure.address).verbosity = Verbosity.ERROR; // Overwrite for a specific contract
// 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 = randomAddress('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();
MIT
[3.1.0] - 2023-03-09
verbosity
in ContractSystem
and ContractExecutor
FAQs
Emulation toolkit for TON Smart Contracts
The npm package @tact-lang/emulator receives a total of 0 weekly downloads. As such, @tact-lang/emulator popularity was classified as not popular.
We found that @tact-lang/emulator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.