Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
scrypt-cli
Advanced tools
Readme
A CLI tool to make development of sCrypt faster and easier.
Note: Node version 16 or greater is required.
npx scrypt-cli project my-proj
or simply
npx scrypt-cli p my-proj
The command creates a new directory my-proj
which contains a demo sCrypt smart contract along with needed scaffolding.
Read the projects README.md
for more info on how to test and deploy the generated smart contract.
You can also use the following command to generate a stateful smart contract project:
npx scrypt-cli p --state my-proj
Lastly, you can create an sCrypt library project with the following option:
npx scrypt-cli p --lib my-lib
Currently only supports projects created by Create React App
npx create-react-app my-app --template typescript
cd my-app
git init && git add . && git commit -m "Initial commit."
npx scrypt-cli init
npx scrypt-cli compile
This will search current project for classes extending SmartContract
and compile them. This will produce a contract artifact file for each compiled class. The files will be stored under the artifacts
directory.
The command needs to run in the root directory of the project.
npx scrypt-cli compile --watch
Initiate smart contract compilation in watch mode. This mode allows you to observe real-time updates and notifications regarding any errors specific to the smart contract compilation phase, which are distinct from TypeScript errors. During watch mode, smart contracts get automatically compiled after a change is made to any of the smart contract source files.
npx scrypt-cli compile --asm
The --asm
option is used to apply inline assembly optimizations. These are defined under the .asm/
directory in the root of the project (auto genereted when using --asm
option with the project
command).
Read more in the docs.
npx scrypt-cli deploy
This will create a deployment script template deploy.ts
if it doesn't exist yet. If it does it executes it. Projects generated using the sCrypt CLI will already have deploy.ts
present.
You can also run a deployment script with a different name using the f
option:
npx scrypt-cli deploy -f myDeployScript.ts
With the verify
you can verify that a already deployed output script was produced by the specified sCrypt code.
npx scrypt-cli verify <scriptHash> <contractPath>
The first positional argument is the double-SHA256 hash of the deployed output script, commonly used by block explorers to index scripts. The second one is the path to the file which contains the sCrypt smart contract. Note, that the file must also include all the code it depends on, i.e. third party libraries.
Using the network
option, you can specify on which network the contract is deployed. This defaults to test
, indicating the Bitcoin testnet:
npx scrypt-cli verify --network main <scriptHash> <contractPath>
You can also specify the version of sCrypt used during verification. By default, the command will use the version specified in package.json
:
npx scrypt-cli verify -V 0.2.1-beta.9 <scriptHash> <contractPath>
When filing an issue a lot of time it's useful to provide information about your system. You can get this information with the following command:
npx scrypt-cli system
Show the version of scrypt-cli:
npx scrypt-cli -v
latest
tag:npx scrypt-cli@latest -v
or
npx clear-npx-cache
npx scrypt-cli -v
FAQs
CLI tool for creating and managing sCrypt projects.
The npm package scrypt-cli receives a total of 108 weekly downloads. As such, scrypt-cli popularity was classified as not popular.
We found that scrypt-cli demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.