Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
chialisp-preclsp
Advanced tools
#安装
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.