Contracting is 100% compatible Python code with a few modifications to make it more deterministic on different machines and safer in untrusted environments. You need to have knowledge of Python to be able to use Contracting.
If you do not know Python, try one of these resources:
Let’s define what a smart contract is, and what one isn’t.
Therefore, we have to make some considerations and alterations to what is allowed in a smart contract. We do not add any additional features to Python that make the code incompatible. Contracting is a strict subset.
In Python, you write code, run it, and it executes. It is either something that happens in sequence and then finishes, or is a long running asynchronous application such as a web server that runs in an event loop and processes requests over a long period of time.
Smart contracts do neither of these things!
Smart contracts define an explicit API that one can call. To execute code, you pass the contract and method name into the executor along with the keyword arguments for the specific method. To submit a new smart contract, you actually invoke a smart contract call specifically developed for submitting smart contracts.
from contracting.execution.executor import Executor
contract_code = '''
def ping(pong: Any):
e = Executor(metering=False)
Telegram: t.me/lamdenchatDiscord: discord.gg/xjBgcAAUpSReddit: reddit.com/r/lamden