209 похожих чатов

So js was supposed to be write once, run anywhere,

would you say it has succeeded, and, (i ask because I'm interested in smart contacts) how do you see tools like chat GPT influencing this. Do you run your code past it, or use it to create a starting point, or anything like that?

2 ответов

9 просмотров

For smart contracts on BCH take a look at Cashscript

Thing to understand about UTXO smart contracts is that they don't perform actions by themselves. When you write a smart contract you write a set of constraints, e.g. "to spend this coin, you must send 10% of its value to contract/address A, you must include a payment to B, and you must provide a token...". Natively the constraints are expressed in ScriptVM bytecode, and nodes will evaluate the TX submitted against constraints and pass or fail a TX. To make it easier, there's a higher level CashScript language that compile to bytecode. Ok, but how does the TX that will satisfy constraints get built? That's the other part - that's the dapp part, the dapp manages tracking contract UTXOs and building TXs that can successfully spend from that. This can be coded in any language.

Похожие вопросы

Карта сайта