Posts Posts + Replies
bitfeed
zhangweis
1 year ago
This idea is quite different from baton utxo idea as the utxos can be splitted and merged. Token utxos can be splitted and merged just like normal utxos.
zhangweis
1 year ago
Utxo+merkle layer1 token
Utxo model is more elegant than account based model for token. It has the difficulty for layer1 token script to judge whether an input is a valid token utxo. Recently utxo+oracle model has been discussed a lot but a trusted third party is introduced
zhangweis
2 years ago
Jsut found Craig had expressed the similiar idea in an interview.
@1:02:05
zhangweis
2 years ago
The layer 2 token needs to be utxo based.
zhangweis
2 years ago
Layer1 layer2 interaction.
zhangweis
2 years ago
Layer 1 order book contract with Layer 2 token
With the difficulty of the layer 1 token and ways of contract communication, we may need a way to have a layer 1 order book contract which can handle layer2 tokens.
zhangweis
2 years ago
https://gist.github.com/zhangweis/f651b7e12acaa7171ab087888e116dc6 It may not run but I think it's enough to express the idea.
zhangweis
2 years ago
Merkle tree proof based data storage
Merkle tree proof based data storage and verification for bitcoin sv script.
zhangweis
2 years ago
Merkle tree proof based data storage
Merkle tree proof based data storage and verification for bitcoin sv script.
zhangweis
2 years ago
我原来在scrypt上做过一个类似想法的原型,供参考。 这个最好配合Layer 1的token方案,不然就要想另外的办法让合约可以验证token的真伪。 生成的测试网交易: https://test.whatsonchain.com/tx/30cc3d743d9e76a314dd7f70aaefabd6bdd976754cd5f9bb8f6c546cb7633f7b contract文件: contract Sell { bytes bsvReceiveScript; int sellAmount; int getAmount; constructor(bytes bsvReceiveScript,int sellAmount, int getAmount) { this.bsvReceiveScript = bsvReceiveScript; this.sellAmount = sellAmount; this.getAmount = getAmount; } public function match(bytes sig
[more]
zhangweis
2 years ago
jq pivot example for count. jq -n '[{name:"a",date:"08/17"},{name:"a",date:"08/20"},{name:"b",date:"08/20"},{name:"b",date:"08/23"}]' | jq --arg rowfield "name" --arg columnfield "date" "$(curl -s https://gitee.com/zhangweis/deno-report-tools/raw/693d2db3ae8387873e18ec2264937708f0b0dd9c/pivot.jq)"
zhangweis
2 years ago
Time series data collecting using cron, curl and jq (example). 0 0 * * * { tail -n 1 /data/funding_rates_bsv.json; curl -s 'https://www.okex.com/api/swap/v3/instruments/BSV-USD-SWAP/historical_funding_rate?limit=10'; } | jq -s -c '.[0] as $last | .[1] | reverse | map(select(.funding_time>$last.funding_time)) | .[]' >> /data/funding_rates_bsv.json
zhangweis
2 years ago
jq sort by string descending. jq -n '["abc", "cba"] | sort_by(explode|map(-.))'