From source code to script hash: Verifying a Cardano escrow contract with UPLC Link

1. Why verification matters

Publishing a smart contract’s source code is a good start, but it does not prove that this code produced the script running on-chain, since a compilation step sits in between. Without a way to reproduce that step, users and auditors have to take the developer’s word for it.

This is especially relevant for contracts that hold funds, like the escrow used by Wenze, a marketplace under development. UPLC Link addresses this by recompiling the source code and comparing the resulting script hash, so anyone can check the link between the two.

2.What is UPLC Link?

UPLC Link is an open-source platform for verifying Cardano smart contracts. It currently supports Aiken.

It recompiles a contract using a specified GitHub repository, commit and compiler version, then compares the resulting script hash with an expected hash. If they match, it provides evidence that the source code and build configuration reproduce the compiled script.

The platform also provides a public registry where verification records can be submitted and discovered by others.

3.Verifying the Wenze escrow contract

The Wenze escrow contract, written in Aiken, served as the practical example for exploring UPLC Link.

Preparing the verification

The following are the project details and configuration used for the test:

The expected hash was taken from the project’s plutus.json file.

The repository URL, commit, compiler version, source path and expected hash were entered into UPLC Link.

The result: all hashes match

After submitting the configuration, UPLC Link compiled the project and displayed the following verification summary:


Successful verification showing the “All Hashes Match!” message and the escrow script marked OK.

The script hash produced by the compilation matched the expected hash from plutus.json.

This was the key result. Using a specific GitHub commit and compiler configuration, UPLC Link reproduced the expected script hash, providing evidence that the published source code and build configuration produce the expected compiled script.

Checking the build log

The result page also includes a Build Log section, which allows users to inspect the compilation process. The log generated during this test showed:


Compilation log generated by UPLC Link.

This shows that the platform did not simply read the expected hash from the repository. It compiled the project using the specified configuration and generated the blueprint before comparing the resulting script hash.

Submitting the script to the registry

Following the successful verification, the script was also submitted to the registry so that other developers can discover its verification record.

Before submission, UPLC Link displayed an estimated transaction fee of 0.17 ADA. The process also required connecting a wallet and signing the transaction to authorize its submission to the Cardano blockchain.

This is an interesting aspect of the platform because registering a verification record involves an on-chain transaction, rather than simply adding an entry to an off-chain database.


Registry submission details showing an estimated transaction fee of 0.17 ADA.

After the transaction was signed, UPLC Link confirmed the submission and returned the following transaction hash:

f5408965e8785decd923a6a4c0579d383e3fd3310037e37d3d8be76d7f7a2d6f


Confirmation screen showing the submitted transaction and its hash.

View the transaction on Cexplorer

Following the submission, the Wenze escrow entry was found in the registry, displaying information such as the script hash, Plutus version and Aiken compiler version.

The UPLC Link Registry Explorer can also be explored using the following script hash:
d5c214c90928733c8a8741b40de67ded41255290af2f4d88400a3d19


Wenze escrow listed in the UPLC Link registry.

What this verification does not cover

It is important to be clear about the scope of this test. UPLC Link reproduced the hash supplied from Wenze’s plutus.json. This does not independently establish that this hash corresponds to the script deployed on Cardano Preprod, which would require a separate comparison with the actual on-chain script.

Likewise, matching a script hash is not a security audit of the contract’s logic.

4. Why developers should verify their contracts

A public repository lets people read the code, but reproducing the compiled script and comparing its hash adds another level of verifiability.

For developers, this provides a way to support their claims with reproducible evidence rather than words alone. Users and auditors also get a more reliable starting point for examining a contract than relying solely on the developer’s claims.

The process builds on tools and practices many developers already use, such as GitHub, commits, compiler versions and script hashes.

For anyone building with Aiken on Cardano, UPLC Link offers a practical way to make contract builds more transparent and allow others to reproduce and examine the results.

To learn more about UPLC Link


Let's keep building, sharing and making Cardano more transparent.
1 Like

A major step toward transparency and trust! Cardano developers should design solutions that anyone can verify. :blue_heart: