Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
chialisp-preclsp
Advanced tools
Readme
#安装
git clone git@gitee.com:woaianqi/chialisp-preclsp.git
cd chialisp-preclsp
npm link
#更新
git pull
#不推荐使用该方法 因为代码库更新较为频繁
npm install chialisp-preclsp -g
#运行clsp源文件
preclsp x.clsp
#运行js驱动代码 (文件必须以#!clsp开头,才会进行编译)
preclsp x.js
(mod (
MY_PUZZLE_HASH
my_amount
)
(defconstant CREATE_COIN 51)
(list
(list CREATE_COIN MY_PUZZLE_HASH my_amount)
)
)
#!clsp
/**
一个简单的智能货币
定义一个收款地址
消费时指定金额即可
消费金额大于部署金额,会报错
小于部署金额,剩余的部分会被当作矿工费哦。
当然你也可以在脚本调用npm的包
*/
//开启debug,当前目录下会生成日志信息供调试
DEBUG()
//设置测试金额
const amount = @XCH(0.0001)
//指定一个clsp源程序文件并curry一个参数
const curryPuzzle = Puzzle.of("train0.clsp").curry(@ph1)
//部署这个合约到主网 立即得到交易对象
const transaction = curryPuzzle.deploy(@fp1,amount)
//等待主网确认交易,获得交易的货币
const coin = await transaction.getCoin()
//设置解决方案 消费该货币
const spentMsg = coin.setSolution([amount]).doSpent()
//如果消费成功,拿到消费的货币
if(spentMsg.success){
//等待主网确认 获取消费后的货币
const [spendCoin] = await spentMsg.getSpendCoins()
//打印该货币
spendCoin.print()
}
preclsp driver0.js
FAQs
precompile chialisp for simple development
We found that chialisp-preclsp 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.