Liquidity
1 program
Added 2026-02-11T14:19:40Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 2d44335560 · authored 2026-02-11T15:20:24+01:00 · agent claude-code · model sonnet
Sources mentioning this language
2 sources · pl_id:
pl/liquidityRelated languages
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Simple Token Contract
Provenance: commit 2d44335560 · authored 2026-02-11T15:20:24+01:00 · agent claude-code · model sonnet · WebSearch disabled
[%%version 2.0]
type storage = {
balances : (address, nat) big_map;
total_supply : nat;
}
let%init storage total_supply =
let owner = Current.sender () in
{
balances = BigMap.add owner total_supply (BigMap []);
total_supply = total_supply;
}
let%entry transfer (dest : address) (amount : nat) storage =
let sender = Current.sender () in
let sender_balance = match BigMap.find sender storage.balances with
| None -> 0p
| Some balance -> balance
in
if sender_balance < amount then
failwith "Insufficient balance"
else
let new_sender_balance = sender_balance - amount in
let dest_balance = match BigMap.find dest storage.balances with
| None -> 0p
| Some balance -> balance
in
let new_dest_balance = dest_balance + amount in
let balances = BigMap.add sender new_sender_balance storage.balances in
let balances = BigMap.add dest new_dest_balance balances in
( [], { storage with balances = balances } )