@venezia is on PowPing!

PowPing is a place where you can earn Bitcoin simply by socializing, for FREE.
Never tried Bitcoin? It's OK! Just come, socialize, and earn Bitcoin.
Check out venezia's activities

Bitcoin Script

visit channel home
Total Economy: 0.12 USD
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?
joe tipped:
0.02 USD
1 year ago
It'd be cool if you wrote a TX that had these challenges, claimable for a BSV reward.
venezia replied:
Good idea!
You start off with [a b c d] Push in 2 empty stack frames OP_0 OP_0 [a b c d 0 0] Rotate bottom pair to top OP_2ROT [c d 0 0 a b] Move top frame to alt stack OP_TOALTSTACK [c d 0 0 a] [b] Nip away the empty frames, OP_NIP OP_NIP [c d a] [b] Put back last element from altstack, OP_FROMALTSTACK [c d a b] Ta-daa!! Entire script: OP_0 OP_0 OP_2ROT OP_TOALTSTACK OP_NIP OP_NIP OP_FROMALTSTACK
venezia tipped:
0.01 USD
1 year ago
venezia replied:
Very quick! There is a shorter solution which also uses the altstack.
adonsats replied:
hahaha! that solution is dear !
adonsats replied:
: 2SWAP ROT TO_ALTSTACK ROT FROM_ALTSTACK ; 🤓 could be the 1bsv cheaper code !
venezia tipped:
0.02 USD
1 year ago
joe tipped:
0.07 USD
1 year ago
joe replied:
Clever!!! I wouldn't have thought of thatA