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.
CashScript is a high-level programming language for smart contracts on Bitcoin Cash. It offers a strong abstraction layer over Bitcoin Cash' native virtual machine, Bitcoin Script. Its syntax is based on Ethereum's smart contract language Solidity, but its functionality is very different since smart contracts on Bitcoin Cash differ greatly from smart contracts on Ethereum. For a detailed comparison of them, refer to the blog post Smart Contracts on Ethereum, Bitcoin and Bitcoin Cash.
See the GitHub repository and the CashScript website for full documentation and usage examples.
CashScript is a high-level language that allows you to write Bitcoin Cash smart contracts in a straightforward and familiar way. Its syntax is inspired by Ethereum's Solidity language, but its functionality is different since the underlying systems have very different fundamentals. See the language documentation for a full reference of the language.
CashScript features a compiler as a standalone command line tool, called cashc
. It can be installed through npm and used to compile .cash
files into .json
artifact files. These artifact files can be imported into the CashScript JavaScript SDK (or other SDKs in the future). Note that the CashScript SDK also has a function to import and compile .cash
files directly, so it is not required to use the cashc
command line tool.
npm install -g cashc
Usage: cashc [options] [source_file]
Options:
--output, -o Specify a file to output the generated artifact. [string]
--hex, -h Compile the contract to hex format rather than a full artifact
[boolean]
--asm, -A Compile the contract to ASM format rather than a full artifact
[boolean]
--opcount, -c Display the number of opcodes in the compiled bytecode[boolean]
--size, -s Display the size in bytes of the compiled bytecode [boolean]
--args, -a List of constructor arguments to pass into the contract. Can
only be used in combination with either the --hex or --asm
flags. When compiling to a JSON artifact, contract
instantiation should be done through the CashScript SDK. Note
that NO type checking is performed by the cashc CLI, so it is
safer to use the CashScript SDK. [array]
--help Show help [boolean]
--version Show version number [boolean]
FAQs
Compile Bitcoin Cash contracts to Bitcoin Cash Script or artifacts
The npm package cashc receives a total of 380 weekly downloads. As such, cashc popularity was classified as not popular.
We found that cashc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.