2P+
Multi Player
126 subscribers

Bitcoin Script

Opcodes, sCrypt, Forth, anything about bitcoin script.

Rules

Please follow the rules below:
# links may help
- BitcoinSV Wiki: https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script
- sCrypt: https://www.scrypt.io/

If you find other useful links about bitcoin script, please leave a post.
blog
Posts
@unwriter
11 hours ago
Onchain orderbook idea (use the translate button)
0
0 USD
@raymond
3 days ago
Hi guys, I don't want to waste anyones time. If someone can give me comprehensive resources to learn how to code on bsv for an absolute beginner to coding ill give a $10 usd tip. I'm also looking for a full time mentor that I would be willing to pay on a negotiated contractual basis. I'm not a great student but this is the only technology I have come across in the sea of shit that is crypto, that would be worth the struggle to learn. All the best to this community regardless of outcome.
5
21.23 USD
@adonsats
4 days ago
question: is there a default altstack in FACTOR ?
0
0 USD
@lamingtons
4 days ago
had an idea for paying people to sort numbers. to spend this you need to provide the indexes of numbers in sorted order. what do you think of this output: 00 00ff11 00ff12 00ff13 00ff18 00ff19 00ff20 00ff14 OP_FROMALTSTACK OP_PICK OP_FROMALTSTACK 01 OP_ADD OP_PICK OP_2DUP OP_LESSTHAN OP_VERIFY OP_SWAP OP_DROP OP_FROMALTSTACK 01 OP_ADD OP_PICK OP_2DUP OP_LESSTHAN OP_VERIFY OP_SWAP OP_DROP OP_FROMALTSTACK 01 OP_ADD OP_PICK OP_2DUP OP_LESSTHAN OP_VERIFY OP_SWAP OP_DROP OP_FROMALTSTACK 01 OP_AD
[more]
4
0.08 USD
@xhliu
1 week ago
https://medium.com/@xiaohuiliu/sun-rising-p2sh-7ebfca9283aa
4
0.12 USD
@adonsats
1 week ago
THIS is why Factor and FORTH are a choice for a scientist: listen -->
yeah we can do that now
0
0.46 USD
@venezia
1 week ago
puzzle-on-chain
0
0 USD
@venezia
2 weeks ago
Now you can use miniforth in browser😆 I hope it can be helpful, such as solving puzzles in this channel.😇
0
9.17 USD
@xhliu
2 weeks ago
Peer-to-peer tokens, aka, how to validate Layer1-tokens without backtracking (well, almost) https://medium.com/@xiaohuiliu/peer-to-peer-tokens-6508986d9593
1
9.48 USD
@venezia
2 weeks ago
2
0.46 USD
@venezia
2 weeks ago
Very cool script debugging tool!
0
0 USD
@slb
2 weeks ago
Tic-tac-toe on Bitcoin SV https://medium.com/@xiaohuiliu/tic-tac-toe-on-bitcoin-sv-5acdf5bd676d
2
0.02 USD
@covid
2 weeks ago
From what I understood R-puzzle are an UTXO you can spend if you know a specific value R. How is it different from something like "OP_HASH value" where value is hash(R) ? So you would need to know R to spend that UTXO
2
0.02 USD
@ccoincash
3 weeks ago
Would anyone share your most complicated script implemented by sCrypt. I want to learn the ability of the sCrypt.
2
0.1 USD
@adonsats
3 weeks ago
some money here, to fund our channel :) https://powping.com/posts/c2b41538fc2525daf4dc85e4bdf8dfa540f257b946c546409aa8f6bbf1ee2a33
0
0.09 USD
@snugg
3 weeks ago
Script is great and all, but I can't brain into stack logic. I understand how it works, but it's very unintuitive and takes a long time to parse out, at least for me. sCrypt is a godsend
4
0.02 USD
@venezia
3 weeks ago
Bitcoin Script provides some Boolean operators. Since the raw script is typeless, we can do some special operations, such as adding and subtracting boolean values. Can you implement OP_BOOLAND and OP_BOOLOR with other OPCODEs ?
4
0.02 USD
@light
3 weeks ago
1
0.01 USD
@venezia
3 weeks ago
What is the most impressive smart contract product you have ever seen? CryptoKitty, FOMO3D, Uniswap or any other?
7
0.05 USD
@snugg
3 weeks ago
Some thinking I previously suffered from, I'm not sure if anyone else fell into this trap. That once you locked away coins in a "contract", that they could only be released once the conditions of that specific contract are met. The solution is simple, and probably obvious to most, add a p2pkh unlock condition on top of the main contract condition, such that you can always close the contract any time you want. In the screenshot, condition1_unlock would be the main contract condition(checks if s
[more]
3
0.42 USD
@dylan
3 weeks ago
Playing around with scrypt... and have another question that I'm sure is simple. I've written a basic bytewise AND contract (see attached image). My understanding is if I were to put OP_1, and OP_2 as the two inputs to this contract, it would be '0x51 & 0x52' which should be 0x50... but I cannot get the contract to evaluate to true. Am I missing something obvious?
1
0.81 USD
@dylan
3 weeks ago
I'm looking for some guidance on spending a non-standard script and I think I'm getting confused... Let's say I make a basic locking script that evaluates to TRUE when the unlocking script is OP_10 (basic sum contract for scrypt) and I attach 1 cent of bitcoin to it. Isn't it true to say that anyone can spend this bitcoin as long as they have the scripthash + provide OP_10 as the unlocking script? What tools are there to try this out if I have a scripthash of a nonstandard output?
1
0.01 USD
@venezia
3 weeks ago
One thing that gave me a headache at first is that all the numbers are little endian. When you get used to it, you don't feel bothered anymore. Similar to other languages, Bitcoin provides these operators to manipulate bits. Can you implement the function of "is_negative" without using any comparison opcodes? It returns false when the input is a positive number, and true when it is a negative number. ("true" can be any value not equal to 0)
5
0.02 USD
@unwriter
4 weeks ago
Idea: a playground web server that lets people connect and play with MiniForth without having to download. Or is it possible to WebAssembly somehow?
3
0.11 USD
@arbiteroffun
4 weeks ago
This has been a really helpful video.
1
0.07 USD
@venezia
4 weeks ago
The Tx preimage is the data we used in signing a bitcoin transaction. Since the BIP143 has been adapted for the replay-protected sighash format in Bitcoin SV, The current composition structure of Tx preimage is as described above. When designing a complex smart contract, we will need to extract data from it. Challenge: Extract the nLocktime number from a Tx preimage by bitcoin opcodes.
4
0.12 USD
@arbiteroffun
4 weeks ago
Hi guys, I am starting to dip my toes into bsv development, and wanted to make a smart contract. Do you guys have any references to documentation? My initial approach was to write data using moneybutton or datapay and include some bitcoin script in the script attributes of the contract? Does this sound like kosher approach? Below are links i've been reviewing to learn about the topic: * https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script#Examples * https://docs.moneybutton.com/
[more]
3
0.05 USD
@baobui
1 month ago
Hi guys, Do you know a setup that can run a simple "hello world" Bitcoin Script? Thanks,
2
0.02 USD
@venezia
1 month ago
Like most other commonly used languages, we can implement very complex logic using control flow operators in Bitcoin Script. Can you use Bitcoin Script implement the classic foobar function? It inputs a number, and if the number is divisible by 3, returns "foo". If it is divisible by 5, returns "bar". If it can be divisible by 3 and 5, it returns "foobar". (Just keep the string as it is, no need to use hex bytes.)
6
0.06 USD
@hv_
1 month ago
https://news.efinancialcareers.com/us-en/3004315/should-you-become-a-bitcoin-script-engineer
0
0.1 USD
@adonsats
1 month ago
I WOULD LIKE TO HAVE THIS TALK IN FULL CODE: https://medium.com/@Stas33496115/bitcoin-script-engineering-part-iii-8307d495bc52 hallo? someone ?
1
0.02 USD
@venezia
1 month ago
Happy weekend everyone! This channel is growing so fast! Hope you can find some fun from here. We can use Bitcoin scripts to manipulate data in bytes. OP_CAT is used to connect data. OP_SPLIT is used to split data. Challenge: Can you use OPCODEs to change the string "abc" to "ABC"?
3
0.89 USD
@ben
1 month ago
https://medium.com/@Stas33496115/bitcoin-script-engineering-part-iv-423b73d10e60
2
0.27 USD
@krambo
1 month ago
I bookmarked this some time ago and thought it may be worth sharing here as a helpful resource. This is not my work and I believe it has evolved into sCrypt at this point but perhaps someone can find it useful. https://github.com/xhliu/bitcoincash-dev/blob/master/README.md#scripts
1
0.23 USD
@adonsats
1 month ago
https://powping.com/posts/d0e9b3c48ae6e873883467ce4276825bc842bba13d36f9c6af7138a6bcc42cd8 this is why I asked for OP_DATACHECKSIG we are all talk... no real token solution. Do we need a special channel for token in bsv? is it not here that we could put an end to this situation ?
1
0.01 USD
@adonsats
1 month ago
@elas_digital @shadders @unwriter @all OP_CHECKDATASIG : How can we implement it in bitcoin script? Is there already a robust script for that ?
4
0.01 USD
@venezia
1 month ago
Imagine there is a conveyor belt. Whenever it rotates, the leftmost element will move to the rightmost. Can you implement a new opcode "OP_-ROT", which works as the inverse operation of OP_ROT?
4
0.05 USD
@adonsats
1 month ago
According to you: what would a Bitcoin engineer's salary be ?
3
0.02 USD
@venezia
1 month ago
The function of OP_SWAP is to exchange the positions of the top two elements of the stack. The function of OP_2SWAP is almost the same as that, except that it uses a pair of elements as the unit. Challenge: Can you implement OP_2SWAP without using OP_PICK or OP_ROLL?
2
0.12 USD
@venezia
1 month ago
DUP family is coming! Can you implement 2DUP and 3DUP with other opcodes?
2
0.49 USD
@venezia
1 month ago
Can you use any two OPcodes to implement OP_LESSTHAN? There is more than one way :D
1
0.01 USD
@venezia
1 month ago
Do you know other ways to push a number onto the stack?
3
0.02 USD
@adonsats
1 month ago
Can we talk more about R-puzzle ? anyone has technical knowledge about it ? a white paper ? How it can influence bitcoin adoption or bitcoin speciality ?
2
0.01 USD
@venezia
1 month ago
Did you know that OP_0 can mean three things at the same time.
3
0.04 USD
@adonsats
1 month ago
Am not an extremist but...you now it is time to have a FORTH school where eveyone know how to build an OS . make those Windows and Mac compete with a 10Kb "toy" language... The language of global money 😎
0
0 USD
@venezia
1 month ago
WAForth ( https://el-tramo.be/waforth/ ) is a Dynamic Forth Compiler for WebAssembly made by Remko Tronçon. You can use it to try some examples, or enter some content at will and see what you get. Here you can see the core words of Forth. ( http://lars.nocrew.org/dpans/dpans6.htm#6.1 )
2
0.01 USD
@adonsats
1 month ago
talking about FORTH. Why not build a forth tool that integrate bitcoin script too ? A one in all IDE for the future of IoT. Comment are welcome :)
0
0 USD
@bitcoinrealist
1 month ago
Cool idea for a channel.
0
0.01 USD